Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

Recall that according to the Division Algorithm, a = qb + r

Answered: 1 week ago

Question

What is the growth rate of GDP per capita?

Answered: 1 week ago