// Test case 1: insert 1 quarter, insert 1 dime and 3 nickel = 50Cents : +ve test case @Test public void testQDNNNHappy() { gumballM1.insertQuarter(); gumballM1.insertDime(); gumballM1.insertNickel(); gumballM1.insertNickel(); gumballM1.insertNickel(); gumballM1.turnCrank(); assertEquals(true, gumballM1.isGumballInSlot()); }
// Test case 4 :Try to take a dispensed gumball and crank the machine again without inserting any // coin @Test public void testTakeGumballAndCrankAgainWithoutInsertingAnyCoinQDNNN() { gumballM1.insertQuarter(); gumballM1.insertDime(); gumballM1.insertNickel(); gumballM1.insertNickel(); gumballM1.insertNickel(); gumballM1.turnCrank(); gumballM1.takeGumballFromSlot(); soldState.turnCrank(); assertEquals(false, gumballM1.isGumballInSlot()); }