mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 06:21:29 +00:00
improve "sulfuras" test
This commit is contained in:
parent
b41fa5cc4d
commit
e9981a498e
@ -2,7 +2,6 @@ package com.gildedrose;
|
|||||||
|
|
||||||
import io.qameta.allure.Feature;
|
import io.qameta.allure.Feature;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.ValueSource;
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
|
|
||||||
@ -45,11 +44,11 @@ class GildedRoseTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Feature("\"Sulfuras\", being a legendary item, never has to be sold or decreases in Quality")
|
@Feature("\"Sulfuras\", being a legendary item, never has to be sold or decreases in Quality")
|
||||||
@Test
|
@ParameterizedTest(name = "sellIn: {arguments}")
|
||||||
void shouldTheNotChangeSulfuras() {
|
@ValueSource(ints = {2, 1, 0, -1, -2})
|
||||||
|
void shouldTheNotChangeSulfuras(int initialSellIn) {
|
||||||
// given
|
// given
|
||||||
val initialQuality = nextInt(70, 90);
|
val initialQuality = nextInt(70, 90);
|
||||||
val initialSellIn = nextInt(3, 50);
|
|
||||||
val itemName = "Sulfuras, Hand of Ragnaros";
|
val itemName = "Sulfuras, Hand of Ragnaros";
|
||||||
GildedRose app = prepareApp(new Item(itemName, initialSellIn, initialQuality));
|
GildedRose app = prepareApp(new Item(itemName, initialSellIn, initialQuality));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user