File tree 6 files changed +106
-74
lines changed
GW2SDK.Tests/Features/Skills
6 files changed +106
-74
lines changed Original file line number Diff line number Diff line change
1
+ using System . Threading . Tasks ;
2
+ using GuildWars2 . Tests . TestInfrastructure ;
3
+ using Xunit ;
4
+
5
+ namespace GuildWars2 . Tests . Features . Skills ;
6
+
7
+ public class SkillById
8
+ {
9
+ [ Fact ]
10
+ public async Task Can_be_found ( )
11
+ {
12
+ var sut = Composer . Resolve < Gw2Client > ( ) ;
13
+
14
+ const int id = 61533 ;
15
+
16
+ var actual = await sut . Skills . GetSkillById ( id ) ;
17
+
18
+ Assert . Equal ( id , actual . Value . Id ) ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ using System . Threading . Tasks ;
2
+ using GuildWars2 . Tests . TestInfrastructure ;
3
+ using Xunit ;
4
+
5
+ namespace GuildWars2 . Tests . Features . Skills ;
6
+
7
+ public class Skills
8
+ {
9
+ [ Fact ]
10
+ public async Task Can_be_listed ( )
11
+ {
12
+ var sut = Composer . Resolve < Gw2Client > ( ) ;
13
+
14
+ var actual = await sut . Skills . GetSkills ( ) ;
15
+
16
+ Assert . Equal ( actual . ResultContext . ResultTotal , actual . Value . Count ) ;
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+ using System . Threading . Tasks ;
3
+ using GuildWars2 . Tests . TestInfrastructure ;
4
+ using Xunit ;
5
+
6
+ namespace GuildWars2 . Tests . Features . Skills ;
7
+
8
+ public class SkillsByFilter
9
+ {
10
+ [ Fact ]
11
+ public async Task Can_be_filtered_by_id ( )
12
+ {
13
+ var sut = Composer . Resolve < Gw2Client > ( ) ;
14
+
15
+ HashSet < int > ids = new ( )
16
+ {
17
+ 1110 ,
18
+ 12693 ,
19
+ 39222
20
+ } ;
21
+
22
+ var actual = await sut . Skills . GetSkillsByIds ( ids ) ;
23
+
24
+ Assert . Collection (
25
+ ids ,
26
+ first => Assert . Contains ( actual . Value , found => found . Id == first ) ,
27
+ second => Assert . Contains ( actual . Value , found => found . Id == second ) ,
28
+ third => Assert . Contains ( actual . Value , found => found . Id == third )
29
+ ) ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change
1
+ using System . Threading . Tasks ;
2
+ using GuildWars2 . Tests . TestInfrastructure ;
3
+ using Xunit ;
4
+
5
+ namespace GuildWars2 . Tests . Features . Skills ;
6
+
7
+ public class SkillsByPage
8
+ {
9
+ [ Fact ]
10
+ public async Task Can_be_filtered_by_page ( )
11
+ {
12
+ var sut = Composer . Resolve < Gw2Client > ( ) ;
13
+
14
+ var actual = await sut . Skills . GetSkillsByPage ( 0 , 3 ) ;
15
+
16
+ Assert . Equal ( 3 , actual . Value . Count ) ;
17
+ Assert . Equal ( 3 , actual . PageContext . PageSize ) ;
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ using System . Threading . Tasks ;
2
+ using GuildWars2 . Tests . TestInfrastructure ;
3
+ using Xunit ;
4
+
5
+ namespace GuildWars2 . Tests . Features . Skills ;
6
+
7
+ public class SkillsIndex
8
+ {
9
+ [ Fact ]
10
+ public async Task Is_not_empty ( )
11
+ {
12
+ var sut = Composer . Resolve < Gw2Client > ( ) ;
13
+
14
+ var actual = await sut . Skills . GetSkillsIndex ( ) ;
15
+
16
+ Assert . Equal ( actual . ResultContext . ResultTotal , actual . Value . Count ) ;
17
+ }
18
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments