mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 23:11:28 +00:00
18 lines
448 B
Java
18 lines
448 B
Java
package com.gildedrose;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
|
|
|
public class GuildedRoseConstructorTest {
|
|
|
|
@Test
|
|
public void validatesInitialItemQualities() {
|
|
Item[] items = new Item[]{
|
|
new Item("+5 Dexterity Vest", 10, -1)
|
|
};
|
|
|
|
assertThatThrownBy(() -> new GildedRose(items)).isInstanceOf(ItemQualityIsNegativeException.class);
|
|
}
|
|
}
|