|
@@ -15,6 +15,7 @@ public class InventoryTest {
|
15
|
15
|
private Item ticket;
|
16
|
16
|
private Item legend;
|
17
|
17
|
private Item other;
|
|
18
|
+ private Item conjured;
|
18
|
19
|
|
19
|
20
|
@Before
|
20
|
21
|
public void setUp(){
|
|
@@ -22,9 +23,11 @@ public class InventoryTest {
|
22
|
23
|
brie = new Item ("Aged Brie", 0,50);
|
23
|
24
|
legend = new Item("Sulfuras, Hand of Ragnaros",0,50);
|
24
|
25
|
other = new Item("other", 5,5);
|
25
|
|
- items =new Item[]{ brie, ticket, legend, other};
|
|
26
|
+ conjured = new Item("Conjored", 5,5);
|
|
27
|
+ items =new Item[]{ brie, ticket, legend, other, conjured};
|
26
|
28
|
store = new Inventory(items);
|
27
|
29
|
|
|
30
|
+
|
28
|
31
|
}
|
29
|
32
|
|
30
|
33
|
@Test
|
|
@@ -217,6 +220,14 @@ public class InventoryTest {
|
217
|
220
|
Assert.assertEquals(expected,actual);
|
218
|
221
|
}
|
219
|
222
|
|
|
223
|
+ @Test
|
|
224
|
+ public void conjuredCheckQuality() {
|
|
225
|
+ store.updateQuality();
|
|
226
|
+ int expected = 3;
|
|
227
|
+ int actual = conjured.getQuality();
|
|
228
|
+ Assert.assertEquals(expected, actual);
|
|
229
|
+ }
|
|
230
|
+
|
220
|
231
|
|
221
|
232
|
}
|
222
|
233
|
|