mpierse преди 6 години
родител
ревизия
5e2856240a
променени са 1 файла, в които са добавени 46 реда и са изтрити 1 реда
  1. 46
    1
      src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java

+ 46
- 1
src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java Целия файл

1
 package com.zipcodewilmington.gildedrose;
1
 package com.zipcodewilmington.gildedrose;
2
 
2
 
3
 import org.junit.Assert;
3
 import org.junit.Assert;
4
+import org.junit.Before;
4
 import org.junit.Test;
5
 import org.junit.Test;
5
 
6
 
6
 public class InventoryTest {
7
 public class InventoryTest {
8
+
9
+    private String name;
10
+    private int sellIn;
11
+    private int quality;
12
+    private Item item;
13
+
14
+    @Before
15
+    public void setUp(){
16
+        item = new Item("Aged Brie", 5,25);
17
+
18
+    }
19
+
7
     @Test
20
     @Test
8
-    public void updateQuantityTest(){
21
+    public void updateQualityTest(){
9
         Assert.assertEquals(1, 1);
22
         Assert.assertEquals(1, 1);
10
     }
23
     }
24
+
25
+    @Test
26
+    public void getNameTest(){
27
+        item.setName("Aged Brie");
28
+        String actual = name;
29
+        String expected = "Aged Brie";
30
+        Assert.assertEquals(expected, actual);
31
+
32
+    }
33
+
34
+    @Test
35
+    public void getSellInTest(){
36
+
37
+    }
38
+
39
+    @Test
40
+    public void setSellInTest(){
41
+
42
+    }
43
+
44
+    @Test
45
+    public void getQualityTest(){
46
+
47
+    }
48
+
49
+    @Test
50
+    public void setQualityTest(){
51
+
52
+    }
53
+
54
+
55
+
11
 }
56
 }
12
 
57