コード例 #1
0
 @Test
 public void testQualitySuperiorToFifthySellinAndQualityUpdate() {
   GildedRose.updateItem(AGED_BRIE_2);
   assertEquals(AGED_BRIE_2.getSellIn(), 9);
   assertEquals(AGED_BRIE_2.getQuality(), 50);
 }
コード例 #2
0
 @Test
 public void testAgedBrieSellinAndQualityUpdate() {
   GildedRose.updateItem(AGED_BRIE);
   assertEquals(AGED_BRIE.getSellIn(), 1);
   assertEquals(AGED_BRIE.getQuality(), 1);
 }
コード例 #3
0
 @Test
 public void testSellInInferiorToZeroSellinAndQualityUpdate() {
   GildedRose.updateItem(SECOND_ITEM);
   assertEquals(SECOND_ITEM.getSellIn(), -1);
   assertEquals(SECOND_ITEM.getQuality(), 18);
 }
コード例 #4
0
 @Test
 public void testQualityInferiorToZeroSellinAndQualityUpdate() {
   GildedRose.updateItem(THIRD_ITEM);
   assertEquals(THIRD_ITEM.getSellIn(), 9);
   assertEquals(THIRD_ITEM.getQuality(), 0);
 }
コード例 #5
0
 @Test
 public void testNoConditionSellinAndQualityDecrease() {
   GildedRose.updateItem(FIRST_ITEM);
   assertEquals(FIRST_ITEM.getSellIn(), 9);
   assertEquals(FIRST_ITEM.getQuality(), 19);
 }