Make MockRepo names more consistent

This commit is contained in:
Deluan 2021-06-08 16:30:19 -04:00
parent 779571a086
commit 110e17b004
12 changed files with 79 additions and 47 deletions

View file

@ -2,19 +2,19 @@ package tests
import "github.com/navidrome/navidrome/model"
type mockedPropertyRepo struct {
type MockedPropertyRepo struct {
model.UserRepository
data map[string]string
err error
}
func (p *mockedPropertyRepo) init() {
func (p *MockedPropertyRepo) init() {
if p.data == nil {
p.data = make(map[string]string)
}
}
func (p *mockedPropertyRepo) Put(id string, value string) error {
func (p *MockedPropertyRepo) Put(id string, value string) error {
if p.err != nil {
return p.err
}
@ -23,7 +23,7 @@ func (p *mockedPropertyRepo) Put(id string, value string) error {
return nil
}
func (p *mockedPropertyRepo) Get(id string) (string, error) {
func (p *MockedPropertyRepo) Get(id string) (string, error) {
if p.err != nil {
return "", p.err
}
@ -34,7 +34,7 @@ func (p *mockedPropertyRepo) Get(id string) (string, error) {
return "", model.ErrNotFound
}
func (p *mockedPropertyRepo) DefaultGet(id string, defaultValue string) (string, error) {
func (p *MockedPropertyRepo) DefaultGet(id string, defaultValue string) (string, error) {
if p.err != nil {
return "", p.err
}