Project developed to start studies on Unit Tests in java with JUnit.
A class called Calculator was created, and it contains the methods:
Addition, subtraction, multiplication and division.
Tests are run in the TestCalculator class. There I used the
annotations:
@BeforeAll --> For executing a block of code before all others
@DisplayName --> Used to name the test
@Test --> To identify the method as a test for JUnit
@AfterEach --> For executing code after each unit test
A class named Vote was created with the "rule" method.
This method receveives an "age" parameter to return if at this age
the person Cannot, Can or Must vote according to the brazillian
polices.
Vote tests are in TestVote.java file.