mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
change assert method signature
This commit is contained in:
parent
a49d454400
commit
8445af69a4
@ -23,7 +23,7 @@ class GildedRoseTest {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
final Item item = app.items[0];
|
final Item item = app.items[0];
|
||||||
assertItem(item, "foo", 0, -1);
|
assertItem(item, "foo", -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Feature("The Quality of an item is never negative")
|
@Feature("The Quality of an item is never negative")
|
||||||
@ -38,7 +38,7 @@ class GildedRoseTest {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
final Item item = app.items[0];
|
final Item item = app.items[0];
|
||||||
assertItem(item, "foo", 0, -1);
|
assertItem(item, "foo", -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Feature("Once the sell by date has passed, Quality degrades twice as fast")
|
@Feature("Once the sell by date has passed, Quality degrades twice as fast")
|
||||||
@ -54,7 +54,7 @@ class GildedRoseTest {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
final Item item = app.items[0];
|
final Item item = app.items[0];
|
||||||
assertItem(item, "foo", initialQuality - 2, -2);
|
assertItem(item, "foo", -2, initialQuality - 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Feature("\"Aged Brie\" actually increases in Quality the older it gets")
|
@Feature("\"Aged Brie\" actually increases in Quality the older it gets")
|
||||||
@ -69,6 +69,6 @@ class GildedRoseTest {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
final Item item = app.items[0];
|
final Item item = app.items[0];
|
||||||
assertItem(item, "Aged Brie", initialQuality + 1, 0);
|
assertItem(item, "Aged Brie", 0, initialQuality + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ public final class TestHelper {
|
|||||||
return new GildedRose(items);
|
return new GildedRose(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void assertItem(Item item, String expectedName, int expectedQuality, int expectedSellIn) {
|
static void assertItem(Item item, String expectedName, int expectedSellIn, int expectedQuality) {
|
||||||
assertThat(item).as("item").isNotNull();
|
assertThat(item).as("item").isNotNull();
|
||||||
assertThat(item.name).as("name").isEqualTo(expectedName);
|
assertThat(item.name).as("name").isEqualTo(expectedName);
|
||||||
assertThat(item.quality).as("quality").isEqualTo(expectedQuality);
|
assertThat(item.quality).as("quality").isEqualTo(expectedQuality);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user