mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 06:21:29 +00:00
extract constant
This commit is contained in:
parent
92fa721005
commit
6391b0530c
@ -13,13 +13,15 @@ import static org.apache.commons.lang3.RandomUtils.nextInt;
|
|||||||
|
|
||||||
class GildedRoseAgedBrieTest {
|
class GildedRoseAgedBrieTest {
|
||||||
|
|
||||||
|
private static final String ITEM_NAME = "Aged Brie";
|
||||||
|
|
||||||
@Feature("The Quality of an item is never more than 50")
|
@Feature("The Quality of an item is never more than 50")
|
||||||
@ParameterizedTest(name = "Initial quality: {arguments}")
|
@ParameterizedTest(name = "Initial quality: {arguments}")
|
||||||
@ValueSource(ints = {49, 50})
|
@ValueSource(ints = {49, 50})
|
||||||
void shouldNotIncreaseQualityAbove50(int initialQuality) {
|
void shouldNotIncreaseQualityAbove50(int initialQuality) {
|
||||||
// given
|
// given
|
||||||
val initialSellIn = nextInt(3, 50);
|
val initialSellIn = nextInt(3, 50);
|
||||||
GildedRose app = prepareApp(new Item("Aged Brie", initialSellIn, initialQuality));
|
GildedRose app = prepareApp(new Item(ITEM_NAME, initialSellIn, initialQuality));
|
||||||
|
|
||||||
// when
|
// when
|
||||||
app.updateQuality();
|
app.updateQuality();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user