Question: Assignment 1 - SOEN4312_: Software Testing & Qual Assu . public class PrimeNumber{ public Boolean validate(final Integer primeNumber) { for (int i = 2; i

Assignment 1 - SOEN4312_: Software Testing & Qual Assu.

public class PrimeNumber{ public Boolean validate(final Integer primeNumber) { for (int i = 2; i < (primeNumber / 2); i++) { if (primeNumber % i == 0) { return false; } } return true; } }

Consider the above class "PrimeNumber" and run the test cases. Perform the following task.

a) invoke the class using "@RunWith" to run the tests in that class.

b) Send atleast 4 parameters to check if these are prime or not.

c) Create a test runner to perform the functional tests. It further notifies failure or successful results. (Use main() for command-line execution)

In Java

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!