@@ -67,16 +67,16 @@ public void AddResourceService_Registers_All_Shorthand_Service_Interfaces()
6767
6868 // assert
6969 var provider = services . BuildServiceProvider ( ) ;
70- Assert . IsType < IntResourceService > ( typeof ( IResourceService < IntResource > ) ) ;
71- Assert . IsType < IntResourceService > ( typeof ( IResourceCmdService < IntResource > ) ) ;
72- Assert . IsType < IntResourceService > ( typeof ( IResourceQueryService < IntResource > ) ) ;
73- Assert . IsType < IntResourceService > ( typeof ( IGetAllService < IntResource > ) ) ;
74- Assert . IsType < IntResourceService > ( typeof ( IGetByIdService < IntResource > ) ) ;
75- Assert . IsType < IntResourceService > ( typeof ( IGetRelationshipService < IntResource > ) ) ;
76- Assert . IsType < IntResourceService > ( typeof ( IGetRelationshipsService < IntResource > ) ) ;
77- Assert . IsType < IntResourceService > ( typeof ( ICreateService < IntResource > ) ) ;
78- Assert . IsType < IntResourceService > ( typeof ( IUpdateService < IntResource > ) ) ;
79- Assert . IsType < IntResourceService > ( typeof ( IDeleteService < IntResource > ) ) ;
70+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IResourceService < IntResource > ) ) ) ;
71+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IResourceCmdService < IntResource > ) ) ) ;
72+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IResourceQueryService < IntResource > ) ) ) ;
73+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IGetAllService < IntResource > ) ) ) ;
74+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IGetByIdService < IntResource > ) ) ) ;
75+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IGetRelationshipService < IntResource > ) ) ) ;
76+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IGetRelationshipsService < IntResource > ) ) ) ;
77+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( ICreateService < IntResource > ) ) ) ;
78+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IUpdateService < IntResource > ) ) ) ;
79+ Assert . IsType < IntResourceService > ( provider . GetService ( typeof ( IDeleteService < IntResource > ) ) ) ;
8080 }
8181
8282 [ Fact ]
@@ -90,16 +90,16 @@ public void AddResourceService_Registers_All_LongForm_Service_Interfaces()
9090
9191 // assert
9292 var provider = services . BuildServiceProvider ( ) ;
93- Assert . IsType < GuidResourceService > ( typeof ( IResourceService < GuidResource , Guid > ) ) ;
94- Assert . IsType < GuidResourceService > ( typeof ( IResourceCmdService < GuidResource , Guid > ) ) ;
95- Assert . IsType < GuidResourceService > ( typeof ( IResourceQueryService < GuidResource , Guid > ) ) ;
96- Assert . IsType < GuidResourceService > ( typeof ( IGetAllService < GuidResource , Guid > ) ) ;
97- Assert . IsType < GuidResourceService > ( typeof ( IGetByIdService < GuidResource , Guid > ) ) ;
98- Assert . IsType < GuidResourceService > ( typeof ( IGetRelationshipService < GuidResource , Guid > ) ) ;
99- Assert . IsType < GuidResourceService > ( typeof ( IGetRelationshipsService < GuidResource , Guid > ) ) ;
100- Assert . IsType < GuidResourceService > ( typeof ( ICreateService < GuidResource , Guid > ) ) ;
101- Assert . IsType < GuidResourceService > ( typeof ( IUpdateService < GuidResource , Guid > ) ) ;
102- Assert . IsType < GuidResourceService > ( typeof ( IDeleteService < GuidResource , Guid > ) ) ;
93+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IResourceService < GuidResource , Guid > ) ) ) ;
94+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IResourceCmdService < GuidResource , Guid > ) ) ) ;
95+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IResourceQueryService < GuidResource , Guid > ) ) ) ;
96+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IGetAllService < GuidResource , Guid > ) ) ) ;
97+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IGetByIdService < GuidResource , Guid > ) ) ) ;
98+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IGetRelationshipService < GuidResource , Guid > ) ) ) ;
99+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IGetRelationshipsService < GuidResource , Guid > ) ) ) ;
100+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( ICreateService < GuidResource , Guid > ) ) ) ;
101+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IUpdateService < GuidResource , Guid > ) ) ) ;
102+ Assert . IsType < GuidResourceService > ( provider . GetService ( typeof ( IDeleteService < GuidResource , Guid > ) ) ) ;
103103 }
104104
105105 [ Fact ]
@@ -109,7 +109,7 @@ public void AddResourceService_Throws_If_Type_Does_Not_Implement_Any_Interfaces(
109109 var services = new ServiceCollection ( ) ;
110110
111111 // act, assert
112- Assert . Throws < JsonApiException > ( ( ) => services . AddResourceService < int > ( ) ) ;
112+ Assert . Throws < JsonApiSetupException > ( ( ) => services . AddResourceService < int > ( ) ) ;
113113 }
114114
115115 private class IntResource : Identifiable { }
0 commit comments