{"modulePath":"github.com/m3dev/dsps/server","version":"v0.0.0-20220907102720-ef901e443504","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package testing\n\n## Functions\n\n```go\nfunc IsError(t *testing.T, expected error, actual error) bool\n```\nIsError asserts error object\n\n```go\nfunc IsOneOfErrors(t *testing.T, expected []error, actual error) bool\n```\nIsOneOfErrors asserts error object\n\n```go\nfunc MakeDuration(str string) domain.Duration\n```\nMakeDuration parses time.Duration\n\n```go\nfunc MakeDurationPtr(str string) *domain.Duration\n```\nMakeDurationPtr parses \\*time.Duration\n\n```go\nfunc MakeIntPtr(value int) *int\n```\nMakeIntPtr returns \\*int\n\n```go\nfunc MessagesEqual(t *testing.T, expected []domain.Message, actual []domain.Message)\n```\nMessagesEqual compares list of Messages by it's content\n\n```go\nfunc WithTextFile(t *testing.T, content string, f func(filename string))\n```\nWithTextFile creates temporary text file\n\n## Types\n\n```go\ntype ChannelProviderFunc func(id domain.ChannelID) (domain.Channel, error)\n```\nChannelProviderFunc wraps function as ChannelProvider\n\n```go\nfunc (f ChannelProviderFunc) Get(id domain.ChannelID) (domain.Channel, error)\n```\nGet implements ChannelProvider\n\n```go\nfunc (f ChannelProviderFunc) GetFileDescriptorPressure() int\n```\nGetFileDescriptorPressure implements ChannelProvider\n\n```go\nfunc (f ChannelProviderFunc) JWTClockSkewLeewayMax() domain.Duration\n```\nJWTClockSkewLeewayMax implements ChannelProvider\n\n```go\nfunc (f ChannelProviderFunc) Shutdown(ctx context.Context)\n```\nShutdown closes ChannelProvider\n\n```go\ntype StubClock interface {\n\tNow() domain.Time\n\n\tSet(time time.Time)\n\tAdd(d time.Duration) domain.Time\n}\n```\nStubClock extends domain.SystemClock interface for testing purpose.\n\n```go\nfunc NewStubClock(_ *testing.T) StubClock\n```\nNewStubClock creates new clock instance\n\n","path":"github.com/m3dev/dsps/server/testing","name":"testing","synopsis":"","isRedistributable":true}
