|
@@ -188,6 +188,27 @@ public class InventoryTest {
|
188
|
188
|
}
|
189
|
189
|
|
190
|
190
|
@Test
|
|
191
|
+ public void backstagePasses0DaysUpdateQualityTest(){
|
|
192
|
+ //Given
|
|
193
|
+ Item backstagePass = new Item("Backstage Passes", 1, 10);
|
|
194
|
+ Item[] itemArr = new Item[1];
|
|
195
|
+ itemArr[0] = backstagePass;
|
|
196
|
+ Inventory newInv = new Inventory(itemArr);
|
|
197
|
+ int expected = 0;
|
|
198
|
+
|
|
199
|
+ //When
|
|
200
|
+ newInv.updateSellIn();
|
|
201
|
+ newInv.updateQuality();
|
|
202
|
+ newInv.updateSellIn();
|
|
203
|
+ newInv.updateQuality();
|
|
204
|
+
|
|
205
|
+ //Then
|
|
206
|
+ int actual = backstagePass.getQuality();
|
|
207
|
+
|
|
208
|
+ Assert.assertEquals(expected, actual);
|
|
209
|
+ }
|
|
210
|
+
|
|
211
|
+ @Test
|
191
|
212
|
public void agedBrieUpdateQualityTest(){
|
192
|
213
|
//Given
|
193
|
214
|
Item agedBrie = new Item("Aged Brie", 20, 5);
|