summaryrefslogtreecommitdiff
path: root/internal/authentication/file_user_provider_hash_mock_test.go
blob: 7ea373f97bf18c74c0d73b634fc4d7c4a6f18d3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/go-crypt/crypt/algorithm (interfaces: Hash)
//
// Generated by this command:
//
//	mockgen -package authentication -destination file_user_provider_hash_mock_test.go -mock_names Hash=MockHash github.com/go-crypt/crypt/algorithm Hash
//

// Package authentication is a generated GoMock package.
package authentication

import (
	reflect "reflect"

	algorithm "github.com/go-crypt/crypt/algorithm"
	gomock "go.uber.org/mock/gomock"
)

// MockHash is a mock of Hash interface.
type MockHash struct {
	ctrl     *gomock.Controller
	recorder *MockHashMockRecorder
	isgomock struct{}
}

// MockHashMockRecorder is the mock recorder for MockHash.
type MockHashMockRecorder struct {
	mock *MockHash
}

// NewMockHash creates a new mock instance.
func NewMockHash(ctrl *gomock.Controller) *MockHash {
	mock := &MockHash{ctrl: ctrl}
	mock.recorder = &MockHashMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHash) EXPECT() *MockHashMockRecorder {
	return m.recorder
}

// Hash mocks base method.
func (m *MockHash) Hash(password string) (algorithm.Digest, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Hash", password)
	ret0, _ := ret[0].(algorithm.Digest)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Hash indicates an expected call of Hash.
func (mr *MockHashMockRecorder) Hash(password any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockHash)(nil).Hash), password)
}

// HashWithSalt mocks base method.
func (m *MockHash) HashWithSalt(password string, salt []byte) (algorithm.Digest, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "HashWithSalt", password, salt)
	ret0, _ := ret[0].(algorithm.Digest)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// HashWithSalt indicates an expected call of HashWithSalt.
func (mr *MockHashMockRecorder) HashWithSalt(password, salt any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HashWithSalt", reflect.TypeOf((*MockHash)(nil).HashWithSalt), password, salt)
}

// MustHash mocks base method.
func (m *MockHash) MustHash(password string) algorithm.Digest {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "MustHash", password)
	ret0, _ := ret[0].(algorithm.Digest)
	return ret0
}

// MustHash indicates an expected call of MustHash.
func (mr *MockHashMockRecorder) MustHash(password any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MustHash", reflect.TypeOf((*MockHash)(nil).MustHash), password)
}

// Validate mocks base method.
func (m *MockHash) Validate() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Validate")
	ret0, _ := ret[0].(error)
	return ret0
}

// Validate indicates an expected call of Validate.
func (mr *MockHashMockRecorder) Validate() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockHash)(nil).Validate))
}