Question: the following is a simple set method in java from the class donkey public class donkey{ //The value of the donkey private int value; //Constructor
the following is a simple set method in java from the class donkey
public class donkey{
//The value of the donkey private int value; //Constructor for the donkey class public donkey() { value = 0; }
/** * Sets the donkey to 1 */ public void set() { value = 1; }
How would I test this method in a new class testDonkey using method header public void testSet(){} (Can use JUnit if you wish)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
