Refactoring to a cleaner architecture

This commit is contained in:
Deluan
2016-03-02 09:07:24 -05:00
parent 74478ce6f9
commit 272a499c7e
27 changed files with 120 additions and 120 deletions
+3 -3
View File
@@ -6,11 +6,11 @@ import (
"github.com/deluan/gosonic/utils"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/tests"
"github.com/deluan/gosonic/repositories"
"encoding/xml"
"github.com/deluan/gosonic/api/responses"
"github.com/deluan/gosonic/consts"
"github.com/deluan/gosonic/tests/mocks"
"github.com/deluan/gosonic/domain"
)
const (
@@ -20,11 +20,11 @@ const (
func TestGetIndexes(t *testing.T) {
tests.Init(t, false)
mockRepo := mocks.CreateMockArtistIndexRepo()
utils.DefineSingleton(new(repositories.ArtistIndex), func() repositories.ArtistIndex {
utils.DefineSingleton(new(domain.ArtistIndexRepository), func() domain.ArtistIndexRepository {
return mockRepo
})
propRepo := mocks.CreateMockPropertyRepo()
utils.DefineSingleton(new(repositories.Property), func() repositories.Property {
utils.DefineSingleton(new(domain.PropertyRepository), func() domain.PropertyRepository {
return propRepo
})