For this activity you will create unit tests using JUnit and some of the available features of JUnit adhering to the Arrange, Act, Assert (AAA) unit testing methodology.
Specifications:
Select two different parts of your course project to unit test.
You will create two separate test class files in JUnit in the appropriate area.
Each JUnit test class must include the following:
At least two @Test methods.
Appropriate assertions.
One or more JUnit test class must include the following:
@Before method.
Include appropriate package import declarations as needed.
Documentation:
Fully describe the parts of your program you are unit testing.
Discuss how you adhered to the Arrange, Act, Assert (AAA) unit testing strategy in your unit tests.
Discuss the type of object(s) that need to be established prior to running each unit test case.
Describe various cases that would optimally each be unit tested, and your approach to determining the test cases for the code being tested. Consider the course readings and additional resources you may leverage.
Incorporate both pass and fail outcomes providing rationale and documentation for each.
Include in your documentation screen captures that demonstrate the output generated when the unit tests pass and fail.
Expand any failed tests to show more detail in the output.
Include screen captures showing how your unit tests are arranged in NetBeans in the Project pane.
Also:
Observe proper commenting/documentation techniques. Include clearly written comments/documentation to explain the purpose of major blocks of code. As needed/appropriate, include additional levels of comments/documentation detail to help you understand your code and logic as well as to help your reader understand the same.
Observe proper naming conventions for classes, attributes, methods, etc.
To submit your work:
Include your .java and screen capture files. Include in a Word document your narrative that discusses the topics above and screen captures of the test results with annotations/descriptions of the test results.
Submit your files as a single zipped “.zip” file