|
@@ -100,7 +100,7 @@ public class InventoryTest {
|
100
|
100
|
|
101
|
101
|
@Test
|
102
|
102
|
public void brieTest01() {
|
103
|
|
- Item item = new Item("Aged Brie", 12, 20);
|
|
103
|
+ Item item = new Item("Aged Brie", 11, 20);
|
104
|
104
|
Item[] items = {item};
|
105
|
105
|
Inventory inv = new Inventory(items);
|
106
|
106
|
|
|
@@ -114,7 +114,7 @@ public class InventoryTest {
|
114
|
114
|
|
115
|
115
|
@Test
|
116
|
116
|
public void brieTest02() {
|
117
|
|
- Item item = new Item("Aged Brie", -1, 20);
|
|
117
|
+ Item item = new Item("Aged Brie", 6, 20);
|
118
|
118
|
Item[] items = {item};
|
119
|
119
|
Inventory inv = new Inventory(items);
|
120
|
120
|
|
|
@@ -127,6 +127,20 @@ public class InventoryTest {
|
127
|
127
|
}
|
128
|
128
|
|
129
|
129
|
@Test
|
|
130
|
+ public void brieTest03() {
|
|
131
|
+ Item item = new Item("Aged Brie", -1, 20);
|
|
132
|
+ Item[] items = {item};
|
|
133
|
+ Inventory inv = new Inventory(items);
|
|
134
|
+
|
|
135
|
+ int expected = 23;
|
|
136
|
+ inv.updateQuality();
|
|
137
|
+ int actual = item.getQuality();
|
|
138
|
+
|
|
139
|
+ Assert.assertEquals(actual, expected);
|
|
140
|
+
|
|
141
|
+ }
|
|
142
|
+
|
|
143
|
+ @Test
|
130
|
144
|
public void otherTest01() {
|
131
|
145
|
Item item = new Item("Goop", 5, 20);
|
132
|
146
|
Item[] items = {item};
|
|
@@ -141,6 +155,20 @@ public class InventoryTest {
|
141
|
155
|
}
|
142
|
156
|
|
143
|
157
|
@Test
|
|
158
|
+ public void otherTest02() {
|
|
159
|
+ Item item = new Item("Goop", -1, 20);
|
|
160
|
+ Item[] items = {item};
|
|
161
|
+ Inventory inv = new Inventory(items);
|
|
162
|
+
|
|
163
|
+ int expected = 19;
|
|
164
|
+ inv.updateQuality();
|
|
165
|
+ int actual = item.getQuality();
|
|
166
|
+
|
|
167
|
+ Assert.assertEquals(expected, actual);
|
|
168
|
+
|
|
169
|
+ }
|
|
170
|
+
|
|
171
|
+ @Test
|
144
|
172
|
public void backStageTest01() {
|
145
|
173
|
Item item = new Item("Backstage passes to a TAFKAL80ETC concert", 12, 20);
|
146
|
174
|
Item[] items = {item};
|
|
@@ -198,22 +226,9 @@ public class InventoryTest {
|
198
|
226
|
|
199
|
227
|
}
|
200
|
228
|
|
201
|
|
- @Test
|
202
|
|
- public void otherTest02() {
|
203
|
|
- Item item = new Item("Goop", -1, 20);
|
204
|
|
- Item[] items = {item};
|
205
|
|
- Inventory inv = new Inventory(items);
|
206
|
|
-
|
207
|
|
- int expected = 18;
|
208
|
|
- inv.updateQuality();
|
209
|
|
- int actual = item.getQuality();
|
210
|
|
-
|
211
|
|
- Assert.assertEquals(expected, actual);
|
212
|
|
-
|
213
|
|
- }
|
214
|
229
|
|
215
|
230
|
@Test
|
216
|
|
- public void sulfurasTest01() {
|
|
231
|
+ public void backStageTest04() {
|
217
|
232
|
Item item = new Item("Backstage passes to a TAFKAL80ETC concert", -1, 10);
|
218
|
233
|
Item[] items = {item};
|
219
|
234
|
Inventory inv = new Inventory(items);
|