jasamuels 6 gadus atpakaļ
vecāks
revīzija
8eaa0f9a71

+ 32
- 3
src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java Parādīt failu

@@ -1,12 +1,41 @@
1 1
 package com.zipcodewilmington.gildedrose;
2 2
 
3 3
 import org.junit.Assert;
4
+import org.junit.Before;
4 5
 import org.junit.Test;
5 6
 
6
-public class InventoryTest {
7
+import java.util.Arrays;
8
+
9
+public class InventoryTest{
10
+
11
+    Inventory inventory;
12
+
13
+    public String actual;
14
+
15
+    @Before
16
+    public void setup(){
17
+
18
+        //Given
19
+
20
+    Item i1 = new Item("Aged Brie", 7, 30);
21
+    Item i2 = new Item("Sulfuras, Hand of Ragnaros", 2,10);
22
+    Item i3 = new Item("Aged Brie", 2, 24);
23
+    Item i4 = new Item("Backstage passes to a TAFKAL80ETC concert", 10, 45);
24
+    Item i5 = new Item("Backstage passes to a TAFKAL80ETC concert", 5, 40);
25
+    Item i6 = new Item("Cheddar", 3, 21);
26
+    Item[] items = new Item[]{i1,i2,i3,i4,i5,i6};
27
+
28
+    inventory = new Inventory(items);
29
+
30
+
31
+    }
32
+
7 33
     @Test
8
-    public void updateQuantityTest(){
9
-        Assert.assertEquals(1, 1);
34
+    public void updateQualityTest1(){
35
+
36
+        inventory.updateQuality();
37
+
38
+        Assert.assertEquals(, 1);
10 39
     }
11 40
 }
12 41