源码索引 / CURRENT IMPLEMENTATION
learning/go-patterns/stages/05-parallel/quote_test.go
14 行 · 点击行号可定位;函数链接随声明位置更新,不手填行号。
跳到函数 / 声明
package main
import (
"context"
"testing"
)
func TestQuoteBusiness(t *testing.T) {
s := NewService(Catalog{"book": 2100, "pen": 300, "shipping": 500})
p, err := s.Quote(context.Background(), "book")
if err != nil || p.Item != "book" || p.Cents != 2600 {
t.Fatalf("%+v %v", p, err)
}
}