mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Test: "Aged Brie" actually increases in Quality the older it gets
This commit is contained in:
parent
0dcd61c881
commit
a49d454400
@ -2,7 +2,6 @@ package com.gildedrose;
|
||||
|
||||
import io.qameta.allure.Feature;
|
||||
import lombok.val;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
@ -57,4 +56,19 @@ class GildedRoseTest {
|
||||
final Item item = app.items[0];
|
||||
assertItem(item, "foo", initialQuality - 2, -2);
|
||||
}
|
||||
|
||||
@Feature("\"Aged Brie\" actually increases in Quality the older it gets")
|
||||
@ParameterizedTest(name = "Initial quality: {arguments}")
|
||||
@ValueSource(ints = {0, 1, 49})
|
||||
void shouldIncreaseQualityForAgedBrie(int initialQuality) {
|
||||
// given
|
||||
GildedRose app = prepareApp(new Item("Aged Brie", 1, initialQuality));
|
||||
|
||||
// when
|
||||
app.updateQuality();
|
||||
|
||||
// then
|
||||
final Item item = app.items[0];
|
||||
assertItem(item, "Aged Brie", initialQuality + 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user