Browse Source

added some test cases

mpierse 6 years ago
parent
commit
5e2856240a
1 changed files with 46 additions and 1 deletions
  1. 46
    1
      src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java

+ 46
- 1
src/test/java/com/zipcodewilmington/gildedrose/InventoryTest.java View File

@@ -1,12 +1,57 @@
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 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 20
     @Test
8
-    public void updateQuantityTest(){
21
+    public void updateQualityTest(){
9 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