Skip to content

javafaktura/s01e05

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javafaktura s01e05 - Unit testing

.images/javafaktura.png

How to read this repository?

Whole repository is divided into couple modules covering various examples and testing techniques. Each module contains its own README.md file which dives into details particular example. In details contains following:

  • Introduction - covers basic information about domain
  • Code - what are main code classes we are testing and what they actually do
  • Bad Tests - testing code which is not written in most efficient way. Main purpose is to present most common mistakes
    • 💩 Smells - comments whats wrong with this particular Bad* examples
  • Better Tests - alternative version of testing code, which should be better. It fixes smells and shows good practices (sometimes opinionated)
    • 👍 Good practices - comments exactly, whats better and what mistakes has been resolved

Bad vs Better prefix naming convention

  • Bad* - classes representing common mistakes and anti-patterns
  • Better* - alternative classes showing how above examples could be easily improved

Comment types:

  •   /** All comments storing additional information withing presented example **/
    
  •   // Alternative version of code **/
    
  1. Hello tests - your first test

    .images/01.jpg

  2. Fifty shades of smog - dealing with multiple data

    .images/02.jpg

  3. Only good weather data, (no) exceptions - testing exceptions

    .images/03.png

  4. Gone with the wind! (anemic vs domain) - simple difference between anemic and domain models

    .images/04.jpg

  5. Where to fly my kite? - TDD step by step

    .images/05.jpg

About

Tests bases on JUnit5 library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%