Which type of tests must you write?

You are writing tests for an application that tracks model rocket launches. The application
includes a function named Velocity that calculates the velocity of a launch, as shown in the
following code. (Line numbers are included for reference only.)

You need to test that the Velocity function:
Throws an exception if the launch is null
Returns epsilon if the time is below the measurement threshold
Returns zero if the launch did not result in any movement
Returns the velocity as distance divided by total seconds
Which type of tests must you write?

You are writing tests for an application that tracks model rocket launches. The application
includes a function named Velocity that calculates the velocity of a launch, as shown in the
following code. (Line numbers are included for reference only.)

You need to test that the Velocity function:
Throws an exception if the launch is null
Returns epsilon if the time is below the measurement threshold
Returns zero if the launch did not result in any movement
Returns the velocity as distance divided by total seconds
Which type of tests must you write?

A.
Performance

B.
End-to-end

C.
Integration

D.
Unit



Leave a Reply 0

Your email address will not be published. Required fields are marked *