CKC Provide a Set of Unit & Integration Assessment in Computer Science Question
Description
Using the attached Spring program, provide a set of Unit and Integration tests for the following files:
- ToySettings.java
- Toy.java
- ToySettingsBuilder.java
- ToyStoreController.java
Each test suite should use the convention of using the original file name with Test appended as a suffix.
For each test case you should:
- (5 points) Identify inputs and outputs that exist in the function and test them.
- (3 points) Identify edge cases that will cause the current tests to fail and include these as tests.
- (2 points) Fix the associated methods to account for the failed test cases.
Total 10 points.
HINTS:
- The Toy and ToySettings classes have a number of setters and getters + some evaluative methods. You should test all of these.
- Private methods are not directly testable. In this case, you should find a public method to call instead.
- Common edge cases include null, 0, empty string, and negative numbers.
- The main integration test(s) should occur inside a ToyStoreControllerTest.java class.
Get your college paper done by experts
Do my questionPlace an order in 3 easy steps. Takes less than 5 mins.
Leave a Reply
Want to join the discussion?Feel free to contribute!