瀏覽代碼

actually finished

Seth 6 年之前
父節點
當前提交
6f8696e813
共有 1 個檔案被更改,包括 14 行新增0 行删除
  1. 14
    0
      src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java

+ 14
- 0
src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java 查看文件

@@ -254,6 +254,20 @@ public class InventoryTest {
254 254
         Assert.assertEquals(expected, actual);
255 255
 
256 256
     }
257
+
258
+    @Test
259
+    public void handTest01() {
260
+        Item item = new Item("Sulfuras, Hand of Ragnaros", 5, 10);
261
+        Item[] items = {item};
262
+        Inventory inv = new Inventory(items);
263
+
264
+        int expected = 11;
265
+        inv.updateQuality();
266
+        int actual = item.getQuality();
267
+
268
+        Assert.assertEquals(expected, actual);
269
+
270
+    }
257 271
 /*
258 272
 
259 273
     @Test