mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-17 23:41:27 +00:00
fix foo test
This commit is contained in:
parent
caf76059af
commit
534dd114e3
@ -2,17 +2,25 @@ package com.gildedrose;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
|
||||||
|
|
||||||
|
|
||||||
public class GildedRoseTest {
|
class GildedRoseTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void foo() {
|
void shouldProcessFooItem() {
|
||||||
Item[] items = new Item[] { new Item("foo", 0, 0) };
|
// given
|
||||||
|
final Item[] items = new Item[]{new Item("foo", 0, 0)};
|
||||||
GildedRose app = new GildedRose(items);
|
GildedRose app = new GildedRose(items);
|
||||||
|
|
||||||
|
// when
|
||||||
app.updateQuality();
|
app.updateQuality();
|
||||||
assertEquals("fixme", app.items[0].name);
|
|
||||||
|
// then
|
||||||
|
final Item item = app.items[0];
|
||||||
|
assertThat(item.name).isEqualTo("foo");
|
||||||
|
assertThat(item.quality).isEqualTo(0);
|
||||||
|
assertThat(item.sellIn).isEqualTo(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user