mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-19 08:21:37 +00:00
basic name test running and passing
This commit is contained in:
parent
e57f845bfb
commit
8ce9c1761f
@ -7,13 +7,20 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Test_Foo(t *testing.T) {
|
func Test_Foo(t *testing.T) {
|
||||||
|
// Arrange
|
||||||
var items = []*gildedrose.Item{
|
var items = []*gildedrose.Item{
|
||||||
{"foo", 0, 0},
|
{"foo", 0, 0},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expected := []*gildedrose.Item{
|
||||||
|
{"foo", -1, -1},
|
||||||
|
}
|
||||||
|
|
||||||
|
// Act
|
||||||
gildedrose.UpdateQuality(items)
|
gildedrose.UpdateQuality(items)
|
||||||
|
|
||||||
if items[0].Name != "fixme" {
|
// Assert
|
||||||
|
if items[0].Name != expected[0].Name {
|
||||||
t.Errorf("Name: Expected %s but got %s ", "fixme", items[0].Name)
|
t.Errorf("Name: Expected %s but got %s ", "fixme", items[0].Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user