







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








1
2
3
4
7
8
9
import org.junit.Test;
public class TreasureChestTest { @Test public void addGold() { ... } }
10
13
import org.junit.Test;
public class TreasureChestTest { @Test public void addGold() { TreasureChest tc = new TreasureChest(10); tc.addGold(10); assertEquals(20,tc.checkGold()); } }
14
@Test public void addGold() { TreasureChest tc = new TreasureChest(10); tc.addGold(10); assertEquals(20,tc.checkGold()); }
@Test public void removeGold() { TreasureChest tc = new TreasureChest(10); tc.removeGold(10); assertEquals (0,tc.checkGold()); }
15
16
19
20
@Ignore(“Not running because
21
22
25