Question: Student Tests Test your code as you develop it , by writing tests in the StudentTests.java file. See the information we provided in that file.
Student Tests
Test your code as you develop it by writing tests in the StudentTests.java file. See the information we provided in that file. Using a JUnit test method is equivalent to writing a main method that calls the methods you are implementing. The JUnit test method will help you as you don't have to write the main method just the code that appears inside For this project you don't have to worry about using assertions if you don't know what they are don't worry with your student tests. Each test will use System.out.println to display results in the Eclipse console. You may not be able to get help during office hours unless you have student tests. Some students implement their project by running public tests over and over; this is fine at the beginning, but now you have to start writing your own tests, as public tests may not be present in future projects.
To grade your student tests, we will check that you have a test for each public method of the Passport class, regardless of what the test is testing this will change in future projects You don't have to worry about providing a test for the private method as it is tested implicitly via public methods.
You should write your tests as you write your methods that is the correct approach Remember that in the real world you will not have public tests; you have to learn how to write your own tests. Also, we have secret tests, so if you want to pass them, you need to thoroughly test your code. By the way, sharing of student tests is not allowed.
We will grade student tests for style ie you should be using good variable names and good indentation Also, although you could test more than one Passport class method on each student test method, it is preferable to have each method of StudentTests.java test one or two Passport methods.
During project grading it will help TAs if you name each test method in StudentTest.java after the methods you are testing. For example, testConstructor, testDefaultConstructor, testPepsiTest, etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
