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
+5 -5
View File
@@ -4,7 +4,7 @@ import (
"testing"
. "github.com/smartystreets/goconvey/convey"
"github.com/deluan/gosonic/utils"
"github.com/deluan/gosonic/models"
"github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/tests"
)
@@ -14,7 +14,7 @@ func TestCollectIndex(t *testing.T) {
ig := utils.IndexGroups{"A":"A", "B":"B", "Tom":"Tom", "X":"X-Z"}
Convey("Simple Name", t, func() {
a := &models.Artist{Name: "Björk"}
a := &domain.Artist{Name: "Björk"}
artistIndex := make(map[string]tempIndex)
collectIndex(ig, a, artistIndex)
@@ -28,7 +28,7 @@ func TestCollectIndex(t *testing.T) {
})
Convey("Name not in the index", t, func() {
a := &models.Artist{Name: "Kraftwerk"}
a := &domain.Artist{Name: "Kraftwerk"}
artistIndex := make(map[string]tempIndex)
collectIndex(ig, a, artistIndex)
@@ -42,7 +42,7 @@ func TestCollectIndex(t *testing.T) {
})
Convey("Name starts with an article", t, func() {
a := &models.Artist{Name: "The The"}
a := &domain.Artist{Name: "The The"}
artistIndex := make(map[string]tempIndex)
collectIndex(ig, a, artistIndex)
@@ -56,7 +56,7 @@ func TestCollectIndex(t *testing.T) {
})
Convey("Name match a multichar entry", t, func() {
a := &models.Artist{Name: "Tom Waits"}
a := &domain.Artist{Name: "Tom Waits"}
artistIndex := make(map[string]tempIndex)
collectIndex(ig, a, artistIndex)