Documentation ¶
Index ¶
- Variables
- func AssertCartProduct(t *testing.T, cart *Cart, product Product)
- func AssertCartProductLines(t *testing.T, cart *Cart, qty int)
- func AssertCartProductQty(t *testing.T, cart *Cart, product Product, qty Quantity)
- func AssertEquals(t *testing.T, got int, want int)
- func AssertNoError(t *testing.T, err error)
- func AssertProduct(t *testing.T, store *StubCartStore, product Product)
- type Cart
- type CartRepository
- type Price
- type Product
- type Products
- type Quantity
- type StubCartStore
- type UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownCart = errors.New("unknown cart")
Functions ¶
func AssertCartProduct ¶ added in v0.3.1
func AssertCartProductLines ¶ added in v0.3.1
func AssertCartProductQty ¶ added in v0.3.1
func AssertEquals ¶ added in v0.3.1
BASIC ASSERTS
func AssertNoError ¶ added in v0.4.1
func AssertProduct ¶
func AssertProduct(t *testing.T, store *StubCartStore, product Product)
Types ¶
type Cart ¶ added in v0.3.1
func (*Cart) AddProduct ¶ added in v0.3.1
func (*Cart) GetProducts ¶ added in v0.3.1
type CartRepository ¶ added in v0.3.1
type StubCartStore ¶
type StubCartStore struct {
Carts []Cart
}
func (*StubCartStore) Save ¶ added in v0.3.1
func (s *StubCartStore) Save(cart *Cart) error
Click to show internal directories.
Click to hide internal directories.