Skip to content

Commit 6c83bd8

Browse files
committed
fix: hotfix constructor ServiceDiscoveryFacadeTests
1 parent 76771d9 commit 6c83bd8

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

test/DiscoveryTests/ServiceDiscoveryFacadeTests.cs

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Collections.Generic;
12
using GettingStarted.Models;
23
using GettingStarted.ResourceDefinitionExample;
34
using JsonApiDotNetCore.Builders;
@@ -34,12 +35,7 @@ public ServiceDiscoveryFacadeTests()
3435
TestModelRepository._dbContextResolver = dbResolverMock.Object;
3536
_services.AddSingleton<IJsonApiOptions>(new JsonApiOptions());
3637
_services.AddScoped((_) => new Mock<ILinkBuilder>().Object);
37-
_services.AddScoped((_) => new Mock<ICurrentRequest>().Object);
38-
_services.AddScoped((_) => new Mock<IPageService>().Object);
39-
_services.AddScoped((_) => new Mock<ISparseFieldsService>().Object);
40-
_services.AddScoped((_) => new Mock<IFilterService>().Object);
41-
_services.AddScoped((_) => new Mock<IIncludeService>().Object);
42-
_services.AddScoped((_) => new Mock<ISortService>().Object);
38+
_services.AddScoped((_) => new Mock<ICurrentRequest>().Object);
4339
_services.AddScoped((_) => new Mock<ITargetedFields>().Object);
4440
_services.AddScoped((_) => new Mock<IResourceGraph>().Object);
4541
_services.AddScoped((_) => new Mock<IGenericServiceFactory>().Object);
@@ -106,16 +102,13 @@ public class TestModelService : DefaultResourceService<TestModel>
106102
{
107103
private static IResourceRepository<TestModel> _repo = new Mock<IResourceRepository<TestModel>>().Object;
108104

109-
public TestModelService(ISortService sortService,
110-
IFilterService filterService,
105+
public TestModelService(IEnumerable<IQueryParameterService> queryParameters,
111106
IJsonApiOptions options,
112-
IIncludeService includeService,
113-
ISparseFieldsService sparseFieldsService,
114-
IPageService pageManager,
107+
IResourceRepository<TestModel, int> repository,
115108
IResourceContextProvider provider,
116109
IResourceHookExecutor hookExecutor = null,
117110
ILoggerFactory loggerFactory = null)
118-
: base(sortService, filterService, _repo, options, includeService, sparseFieldsService, pageManager, provider, hookExecutor, loggerFactory) { }
111+
: base(queryParameters, options, repository, provider, hookExecutor, loggerFactory) { }
119112
}
120113

121114
public class TestModelRepository : DefaultResourceRepository<TestModel>

0 commit comments

Comments
 (0)