Documentation ¶
Overview ¶
Package mock implements mocking of the store.Service for tests.
Please import this package as:
import ( "github.com/corestoreio/csfw/store/storemock" )
To avoid confusion with other mock packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewStoreAU ¶
MustNewStoreAU creates a new Store with an attached config. Store ID 5, Code "au"; Website ID 2, Code "oz"; GroupID 3.
func NewEurozzyService ¶
NewEurozzyService creates a fully initialized store.Service with 3 websites, 4 groups and 7 stores used for testing. Panics on error. Website 1 contains Europe and website 2 contains Australia/New Zealand.
Types ¶
type Find ¶
type Find struct { DefaultStoreIDFn func(runMode scope.TypeID) (storeID, websiteID int64, err error) StoreIDbyCodeFn func(runMode scope.TypeID, storeCode string) (storeID, websiteID int64, err error) // contains filtered or unexported fields }
Find implements interface store.Finder for mocking in tests. Thread safe.
func NewDefaultStoreID ¶
NewFindDefaultStoreID creates a new closure for the function DefaultStoreID. The last variadic argument allows to append the other NewFind*() function.
func NewStoreIDbyCode ¶
NewStoreIDbyCode creates a new closure for the function StoreIDbyCode. The last variadic argument allows to append the other NewFind*() function.
func (*Find) DefaultStoreID ¶
func (*Find) DefaultStoreIDInvoked ¶
DefaultStoreIDInvoked returns the number of DefaultStoreID() call invocations.
func (*Find) StoreIDbyCode ¶
func (*Find) StoreIDbyCodeInvoked ¶
StoreIDbyCodeInvoked returns the number of StoreIDbyCode() call invocations.