Question: JUnit Testing: Complete the JUnit test method, , which will test the Toy constructor and the and methods in the Toy class shown below. public
JUnit Testing:
Complete the JUnit test method,
which will test the Toy constructor and
the and methods in the Toy class shown below.
public class Toy
private String name;
private int qty;
public ToyString name, int qty
this. name name;
this. qty qty;
public String getName
return name;
public int getQuantity
return qty;
other methods not shown
JUnit test Method
class ToyTest
OTest
void testToyGetters
add your code here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
