mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-14 22:21:20 +00:00
Item quality should never be negative
This commit is contained in:
parent
d4b6c6b20c
commit
3377fd698a
@ -53,6 +53,17 @@ class GildedRoseTest {
|
|||||||
assertEquals(standardItem.quality, qualityStart - 1);
|
assertEquals(standardItem.quality, qualityStart - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void should_never_be_never_negative_item_quality() {
|
||||||
|
Item item = new Item("First Standard Item", 4, 0);
|
||||||
|
GildedRose gildedRose = new GildedRose(new Item[] { item });
|
||||||
|
|
||||||
|
gildedRose.updateQuality();
|
||||||
|
|
||||||
|
assertEquals(item.quality, 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void should_decrease__twice_as_fast_past_sellin_date_item_quality() {
|
void should_decrease__twice_as_fast_past_sellin_date_item_quality() {
|
||||||
Item item = new Item("A new standard Item to be decreased twice as fast ", -1, 4);
|
Item item = new Item("A new standard Item to be decreased twice as fast ", -1, 4);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user