@Test public void add_itemA100の実行後はgetNum_itemA100は2を返す() throws Exception { // Exercise sut.add(itemA100); // Verify assertThat(sut.getNum(itemA100), is(2)); }
@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)); }
@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)); }
@Before public void setUp() throws Exception { sut = new ItemStock(); itemA100 = new Item("A", 100); sut.add(itemA100); }