mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Updated NormalItemUpdateService test: sellIn is decreased test case
This commit is contained in:
parent
807125a909
commit
a90385b7e5
@ -50,3 +50,14 @@ func TestNormalItemUpdateService_QualityNotLowerThan0(t *testing.T) {
|
|||||||
assert.Equal(t, 0, item.Model.Quality)
|
assert.Equal(t, 0, item.Model.Quality)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sellIn date must decrease
|
||||||
|
func TestNormalItemUpdateService_SellInIsDecreased(t *testing.T) {
|
||||||
|
runTestCase(t, func(
|
||||||
|
normalItemUpdateService NormalItemUpdateService,
|
||||||
|
) {
|
||||||
|
item := models.NewItem(&models.ItemModel{"Random normal item", -4, 0})
|
||||||
|
normalItemUpdateService.UpdateQuality(item)
|
||||||
|
assert.Equal(t, -5, item.Model.SellIn)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user