mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
test: "Sulfuras", being a legendary item, never has to be sold or decreases in Quality
This commit is contained in:
parent
fe2a19749b
commit
b7f63143af
@ -58,6 +58,23 @@ class GildedRoseTest {
|
||||
assertItem(item, "foo", -2, initialQuality - 2);
|
||||
}
|
||||
|
||||
@Feature("\"Sulfuras\", being a legendary item, never has to be sold or decreases in Quality")
|
||||
@Test
|
||||
void shouldTheNotChangeSulfuras() {
|
||||
// given
|
||||
val initialQuality = nextInt(70, 90);
|
||||
val initialSellIn = nextInt(3, 50);
|
||||
val itemName = "Sulfuras, Hand of Ragnaros";
|
||||
GildedRose app = prepareApp(new Item(itemName, initialSellIn, initialQuality));
|
||||
|
||||
// when
|
||||
app.updateQuality();
|
||||
|
||||
// then
|
||||
final Item item = app.items[0];
|
||||
assertItem(item, itemName, initialSellIn, initialQuality);
|
||||
}
|
||||
|
||||
@Feature("\"Aged Brie\" actually increases in Quality the older it gets")
|
||||
@Feature("The Quality of an item is never more than 50")
|
||||
@ParameterizedTest(name = "Initial quality: {arguments}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user