mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-18 16:01:42 +00:00
24 lines
472 B
Go
24 lines
472 B
Go
package main
|
|
|
|
import ("testing"
|
|
"fmt")
|
|
|
|
func Test_Foo(t *testing.T) {
|
|
var items = []*Item{
|
|
&Item{"Conjured Mana Cake", 1, 10},
|
|
}
|
|
|
|
days := 2
|
|
for day := 0; day < days; day++ {
|
|
UpdateQuality(items)
|
|
fmt.Println(items[0])
|
|
}
|
|
|
|
if items[0].name != "Conjured Mana Cake" {
|
|
t.Errorf("Name: Expected %s but got %s ", "Conjured Mana Cake", items[0].name)
|
|
}
|
|
if items[0].quality != 4 {
|
|
t.Errorf("Quality: Expected %s but got %d","4",items[0].quality)
|
|
}
|
|
}
|