Question: ( b ) Testing the Flight class ( use JUnit 4 ) : Once the Flight class has no compilation errors: Write the code for

(b) Testing the Flight class (use JUnit 4):
Once the Flight class has no compilation errors:
Write the code for the JUnit test method testConstructor() that tests the constructor
by providing it with valid arguments.
Write a JUnit test method testInvalidConstructor() that tests the constructor
with invalid arguments. The test should pass only if an IllegalArgumentException is thrown.
Test the public methods that include all the getters, setters, the bookASeat() method and the
toString() method, using Junit.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!