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

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!