55 "net/http"
66 "testing"
77 "reflect"
8+ "github.com/nmccrory/go-bnet/sc2"
9+ "github.com/nmccrory/go-bnet/wow"
810)
911const sc2ProfileResp = `{ "characters":
1012 [{
@@ -111,24 +113,24 @@ func TestProfileService_SC2(t *testing.T) {
111113 if actual .Characters == nil {
112114 t .Fatal ("err: This user has no Starcraft 2 profile." )
113115 }
114- want := SC2Character {ID : 1234567 ,
116+ want := sc2. SC2Character {ID : 1234567 ,
115117 Realm : 1 ,
116118 DisplayName : "foobar" ,
117119 ClanName : "foobar" ,
118120 ClanTag : "foobar" ,
119121 ProfilePath : "/profile/1234567/1/foobar/" ,
120- Portrait : CharacterImage {- 10 , - 10 , 10 , 10 , 10 ,
122+ Portrait : sc2. CharacterImage {- 10 , - 10 , 10 , 10 , 10 ,
121123 "http://media.blizzard.com/sc2/portraits/dummy.jpg" },
122- Career : Career {"PROTOSS" , 0 , 0 , 0 ,
124+ Career : sc2. Career {"PROTOSS" , 0 , 0 , 0 ,
123125 "DIAMOND" , 0 , 100 },
124- SwarmLevels : SwarmLevels {10 ,
125- Level {1 , 1000 , 0 },
126- Level {2 , 1000 , 0 },
127- Level {3 , 1000 , 0 }},
128- Season : Season {123 , 1 , 2017 , 0 },
129- Rewards : Rewards {[]int {12345678 , 12345678 }, []int {12345678 , 12345678 }},
130- Achievements : Achievements {Points {1234 },
131- []Achievement {Achievement {123456789 , 123456789 }}},
126+ SwarmLevels : sc2. SwarmLevels {10 ,
127+ sc2. Level {1 , 1000 , 0 },
128+ sc2. Level {2 , 1000 , 0 },
129+ sc2. Level {3 , 1000 , 0 }},
130+ Season : sc2. Season {123 , 1 , 2017 , 0 },
131+ Rewards : sc2. Rewards {[]int {12345678 , 12345678 }, []int {12345678 , 12345678 }},
132+ Achievements : sc2. Achievements {sc2. Points {1234 },
133+ []sc2. Achievement {sc2. Achievement {123456789 , 123456789 }}},
132134 }
133135 if ! reflect .DeepEqual (actual .Characters [0 ], want ) {
134136 t .Fatalf ("returned %+v, want %+v" , actual .Characters [0 ], want )
@@ -149,7 +151,7 @@ func TestProfileService_WoW(t *testing.T) {
149151 if actual .Characters == nil {
150152 t .Fatal ("err: This user has no World of Warcraft characters." )
151153 }
152- want := WoWCharacter {
154+ want := wow. WoWCharacter {
153155 Name : "foobar" ,
154156 Realm : "foobar" ,
155157 BattleGroup : "Foo" ,
@@ -159,7 +161,7 @@ func TestProfileService_WoW(t *testing.T) {
159161 Level : 99 ,
160162 AchievementPoints : 1234 ,
161163 Thumbnail : "foobar/123/avatar.jpg" ,
162- Spec : Spec {"foobar" , "foobar" , "foo-bar" , "foo_bar" ,
164+ Spec : wow. Spec {"foobar" , "foobar" , "foo-bar" , "foo_bar" ,
163165 "Quick brown fox jumps over the lazy dog." , 1 },
164166 Guild : "Foo" ,
165167 GuildRealm : "foobar" ,
0 commit comments