Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 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 :
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started