Exemplo n.º 1
0
 @Test
 public void add_itemA100の実行後はgetNum_itemA100は2を返す() throws Exception {
   // Exercise
   sut.add(itemA100);
   // Verify
   assertThat(sut.getNum(itemA100), is(2));
 }
Exemplo n.º 2
0
 @Test
 public void add_itemA200の実行後はget_itemAは2を返す() throws Exception {
   // SetUp
   Item itemA200 = new Item("A", 200);
   // Exercise
   sut.add(itemA200);
   // Verify
   assertThat(sut.getNum(itemA100), is(2));
 }
Exemplo n.º 3
0
 @Test
 public void add_itemB200の実行後はgetNum_itemB200は1を返す() throws Exception {
   // SetUp
   Item itemB200 = new Item("B", 200);
   // Exercise
   sut.add(itemB200);
   // Verify
   assertThat(sut.getNum(itemB200), is(1));
 }
Exemplo n.º 4
0
 @Test
 public void getNum_itemA100は1を返す() throws Exception {
   // Exercise
   // Verify
   assertThat(sut.getNum(itemA100), is(1));
 }
Exemplo n.º 5
0
 @Before
 public void setUp() throws Exception {
   sut = new ItemStock();
   itemA100 = new Item("A", 100);
   sut.add(itemA100);
 }