test

package
v0.0.0-...-b2f7ccc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMock = errors.New("some error")

	TimeMock = time.Date(2021, time.Month(7), 24, 20, 0, 0, 0, jst).Local()
	DateMock = time.Date(2021, time.Month(7), 24, 0, 0, 0, 0, jst).Local()
)

Functions

func Now

func Now() time.Time

func TestGRPC

func TestGRPC(t *testing.T, expect *TestResponse, res interface{}, err error)

Types

type DBMocks

type DBMocks struct {
	UserDB *database.Client
}

func NewDBMock

func NewDBMock(ctrl *gomock.Controller) (*DBMocks, error)

func (*DBMocks) Delete

func (m *DBMocks) Delete(cli *database.Client, tables ...string) error

func (*DBMocks) DeleteAll

func (m *DBMocks) DeleteAll() error

type Mocks

type Mocks struct {
	AdminRequestValidation *mock_validation.MockAdminRequestValidation
	AuthRequestValidation  *mock_validation.MockAuthRequestValidation
	ChatApplication        *mock_application.MockChatApplication
	ChatDomainValidation   *mock_chat.MockValidation
	ChatRepository         *mock_chat.MockRepository
	ChatRequestValidation  *mock_validation.MockChatRequestValidation
	ChatUploader           *mock_chat.MockUploader
	UserApplication        *mock_application.MockUserApplication
	UserDomainValidation   *mock_user.MockValidation
	UserRepository         *mock_user.MockRepository
	UserRequestValidation  *mock_validation.MockUserRequestValidation
	UserUploader           *mock_user.MockUploader
}

func NewMocks

func NewMocks(ctrl *gomock.Controller) *Mocks

type TestResponse

type TestResponse struct {
	Code    codes.Code
	Message proto.Message
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL