Documentation ¶
Index ¶
- func ExecuteFailedTest(t *testing.T, parser TextParser, query string, expectedError error)
- func ExecuteSuccessTest(t *testing.T, parser TextParser, query string, expect bson.D)
- func FindCompare(t *testing.T, collection *mongo.Collection, filter interface{}, ...)
- func NewClientWithCollection(t *testing.T, mongoDB *strikememongo.Server) (*mongo.Client, *mongo.Collection, *mongo.Database)
- func NewStrikemongoServer(t *testing.T) *strikememongo.Server
- func Populate(t *testing.T, collection *mongo.Collection, items []interface{})
- type DummyDoc
- type TextParser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteFailedTest ¶
func ExecuteFailedTest(t *testing.T, parser TextParser, query string, expectedError error)
func ExecuteSuccessTest ¶
func FindCompare ¶
func FindCompare(t *testing.T, collection *mongo.Collection, filter interface{}, sort interface{}, items ...DummyDoc)
func NewClientWithCollection ¶
func NewClientWithCollection( t *testing.T, mongoDB *strikememongo.Server, ) (*mongo.Client, *mongo.Collection, *mongo.Database)
NewClientWithCollection create a new mongo client for given strikemongo.
func NewStrikemongoServer ¶
func NewStrikemongoServer(t *testing.T) *strikememongo.Server
NewStrikemongoServer creates a new strikemongo instance. Connection string can be obtained by `strikememongo.RandomDatabase()`. Keep in mind to stop the server after testing `defer mongoServer.Stop()`.
Types ¶
Click to show internal directories.
Click to hide internal directories.