File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
ProjectLighthouse.Tests.GameApiTests/Unit/Activity Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using System . Linq ;
3+ using LBPUnion . ProjectLighthouse . Extensions ;
4+ using LBPUnion . ProjectLighthouse . Types . Activity ;
5+ using LBPUnion . ProjectLighthouse . Types . Entities . Activity ;
6+ using Xunit ;
7+
8+ namespace ProjectLighthouse . Tests . GameApiTests . Unit . Activity ;
9+
10+ public class ActivityGroupingTests
11+ {
12+ [ Fact ]
13+ public void ActivityGroupingTest ( )
14+ {
15+ List < ActivityDto > activities = new ( )
16+ {
17+ new ActivityDto
18+ {
19+ TargetPlaylistId = 1 ,
20+ Activity = new ActivityEntity ( ) ,
21+ } ,
22+ } ;
23+ List < OuterActivityGroup > groups = activities . AsQueryable ( ) . ToActivityGroups ( ) . ToList ( ) . ToOuterActivityGroups ( ) ;
24+ Assert . NotNull ( groups ) ;
25+ Assert . Single ( groups ) ;
26+ OuterActivityGroup groupEntry = groups . First ( ) ;
27+
28+ Assert . Equal ( ActivityGroupType . Playlist , groupEntry . Key . GroupType ) ;
29+ Assert . Equal ( 1 , groupEntry . Key . TargetId ) ;
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments