mocks

package
v4.30.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package mocks is a generated GoMock package.

Package mock_notification is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAPI

type MockAPI struct {
	// contains filtered or unexported fields
}

MockAPI is a mock of API interface.

func NewMockAPI

func NewMockAPI(ctrl *gomock.Controller) *MockAPI

NewMockAPI creates a new mock instance.

func (*MockAPI) Call

func (m *MockAPI) Call(arg0 url.Values, arg1 *middlewares.AutheliaCtx) (*duo.Response, error)

Call mocks base method.

func (*MockAPI) EXPECT

func (m *MockAPI) EXPECT() *MockAPIMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

type MockAPIMockRecorder

type MockAPIMockRecorder struct {
	// contains filtered or unexported fields
}

MockAPIMockRecorder is the mock recorder for MockAPI.

func (*MockAPIMockRecorder) Call

func (mr *MockAPIMockRecorder) Call(arg0, arg1 interface{}) *gomock.Call

Call indicates an expected call of Call.

type MockAutheliaCtx

type MockAutheliaCtx struct {
	// Logger hook.
	Hook *test.Hook
	Ctx  *middlewares.AutheliaCtx
	Ctrl *gomock.Controller

	// Providers.
	UserProviderMock    *MockUserProvider
	StorageProviderMock *storage.MockProvider
	NotifierMock        *MockNotifier

	UserSession *session.UserSession

	Clock TestingClock
}

MockAutheliaCtx a mock of AutheliaCtx.

func NewMockAutheliaCtx

func NewMockAutheliaCtx(t *testing.T) *MockAutheliaCtx

NewMockAutheliaCtx create an instance of AutheliaCtx mock.

func NewMockAutheliaCtxWithUserSession

func NewMockAutheliaCtxWithUserSession(t *testing.T, userSession session.UserSession) *MockAutheliaCtx

NewMockAutheliaCtxWithUserSession create an instance of AutheliaCtx mock with predefined user session.

func (*MockAutheliaCtx) Assert200KO

func (m *MockAutheliaCtx) Assert200KO(t *testing.T, message string)

Assert200KO assert an error response from the service.

func (*MockAutheliaCtx) Assert200OK

func (m *MockAutheliaCtx) Assert200OK(t *testing.T, data interface{})

Assert200OK assert a successful response from the service.

func (*MockAutheliaCtx) Assert401KO

func (m *MockAutheliaCtx) Assert401KO(t *testing.T, message string)

Assert401KO assert an error response from the service.

func (*MockAutheliaCtx) Close

func (m *MockAutheliaCtx) Close()

Close close the mock.

func (*MockAutheliaCtx) GetResponseData

func (m *MockAutheliaCtx) GetResponseData(t *testing.T, data interface{})

GetResponseData retrieves a response from the service.

func (*MockAutheliaCtx) SetRequestBody

func (m *MockAutheliaCtx) SetRequestBody(t *testing.T, body interface{})

SetRequestBody set the request body from a struct with json tags.

type MockNotifier

type MockNotifier struct {
	// contains filtered or unexported fields
}

MockNotifier is a mock of Notifier interface.

func NewMockNotifier

func NewMockNotifier(ctrl *gomock.Controller) *MockNotifier

NewMockNotifier creates a new mock instance.

func (*MockNotifier) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNotifier) Send

func (m *MockNotifier) Send(arg0, arg1, arg2, arg3 string) error

Send mocks base method.

func (*MockNotifier) StartupCheck

func (m *MockNotifier) StartupCheck() (bool, error)

StartupCheck mocks base method.

type MockNotifierMockRecorder

type MockNotifierMockRecorder struct {
	// contains filtered or unexported fields
}

MockNotifierMockRecorder is the mock recorder for MockNotifier.

func (*MockNotifierMockRecorder) Send

func (mr *MockNotifierMockRecorder) Send(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Send indicates an expected call of Send.

func (*MockNotifierMockRecorder) StartupCheck

func (mr *MockNotifierMockRecorder) StartupCheck() *gomock.Call

StartupCheck indicates an expected call of StartupCheck.

type MockUserProvider

type MockUserProvider struct {
	// contains filtered or unexported fields
}

MockUserProvider is a mock of UserProvider interface.

func NewMockUserProvider

func NewMockUserProvider(ctrl *gomock.Controller) *MockUserProvider

NewMockUserProvider creates a new mock instance.

func (*MockUserProvider) CheckUserPassword

func (m *MockUserProvider) CheckUserPassword(arg0, arg1 string) (bool, error)

CheckUserPassword mocks base method.

func (*MockUserProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserProvider) GetDetails

func (m *MockUserProvider) GetDetails(arg0 string) (*authentication.UserDetails, error)

GetDetails mocks base method.

func (*MockUserProvider) UpdatePassword

func (m *MockUserProvider) UpdatePassword(arg0, arg1 string) error

UpdatePassword mocks base method

type MockUserProviderMockRecorder

type MockUserProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserProviderMockRecorder is the mock recorder for MockUserProvider.

func (*MockUserProviderMockRecorder) CheckUserPassword

func (mr *MockUserProviderMockRecorder) CheckUserPassword(arg0, arg1 interface{}) *gomock.Call

CheckUserPassword indicates an expected call of CheckUserPassword.

func (*MockUserProviderMockRecorder) GetDetails

func (mr *MockUserProviderMockRecorder) GetDetails(arg0 interface{}) *gomock.Call

GetDetails indicates an expected call of GetDetails.

func (*MockUserProviderMockRecorder) UpdatePassword

func (mr *MockUserProviderMockRecorder) UpdatePassword(arg0, arg1 interface{}) *gomock.Call

UpdatePassword indicates an expected call of UpdatePassword.

type TestingClock

type TestingClock struct {
	// contains filtered or unexported fields
}

TestingClock implementation of clock for tests.

func (*TestingClock) After

func (dc *TestingClock) After(d time.Duration) <-chan time.Time

After return a channel receiving the time after duration has elapsed.

func (*TestingClock) Now

func (dc *TestingClock) Now() time.Time

Now return the stored clock.

func (*TestingClock) Set

func (dc *TestingClock) Set(now time.Time)

Set set the time of the clock.

Jump to

Keyboard shortcuts

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