Skip to content

Commit 665920b

Browse files
committed
Resharper: Use lambda expression
1 parent 60a6b40 commit 665920b

34 files changed

+40
-160
lines changed

test/DapperTests/IntegrationTests/AtomicOperations/AtomicOperationsTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,7 @@ public async Task Can_rollback_on_error()
396396

397397
const string personLocalId = "new-person";
398398

399-
await _testContext.RunOnDatabaseAsync(dbContext =>
400-
{
401-
return _testContext.ClearAllTablesAsync(dbContext);
402-
});
399+
await _testContext.RunOnDatabaseAsync(dbContext => _testContext.ClearAllTablesAsync(dbContext));
403400

404401
var requestBody = new
405402
{

test/JsonApiDotNetCoreTests/IntegrationTests/Archiving/ArchiveTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ public ArchiveTests(IntegrationTestContext<TestableStartup<TelevisionDbContext>,
2121
testContext.UseController<TelevisionBroadcastsController>();
2222
testContext.UseController<BroadcastCommentsController>();
2323

24-
testContext.ConfigureServices(services =>
25-
{
26-
services.AddResourceDefinition<TelevisionBroadcastDefinition>();
27-
});
24+
testContext.ConfigureServices(services => services.AddResourceDefinition<TelevisionBroadcastDefinition>());
2825
}
2926

3027
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Creating/AtomicCreateResourceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ public AtomicCreateResourceTests(IntegrationTestContext<TestableStartup<Operatio
2626
testContext.UseController<MusicTracksController>();
2727
testContext.UseController<PlaylistsController>();
2828

29-
testContext.ConfigureServices(services =>
30-
{
31-
services.AddSingleton<ISystemClock, FrozenSystemClock>();
32-
});
29+
testContext.ConfigureServices(services => services.AddSingleton<ISystemClock, FrozenSystemClock>());
3330

3431
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3532
options.AllowUnknownFieldsInRequestBody = false;

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Links/AtomicAbsoluteLinksTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public AtomicAbsoluteLinksTests(IntegrationTestContext<TestableStartup<Operation
2525
testContext.UseController<TextLanguagesController>();
2626
testContext.UseController<RecordCompaniesController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
31-
});
28+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3229
}
3330

3431
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Links/AtomicRelativeLinksWithNamespaceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ public AtomicRelativeLinksWithNamespaceTests(
2626
testContext.UseController<TextLanguagesController>();
2727
testContext.UseController<RecordCompaniesController>();
2828

29-
testContext.ConfigureServices(services =>
30-
{
31-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
32-
});
29+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3330
}
3431

3532
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Mixed/AtomicTraceLoggingTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ public AtomicTraceLoggingTests(IntegrationTestContext<TestableStartup<Operations
2929
options.AddFilter((category, _) => category != null && category.StartsWith("JsonApiDotNetCore.", StringComparison.Ordinal));
3030
});
3131

32-
testContext.ConfigureServices(services =>
33-
{
34-
services.AddSingleton(loggerFactory);
35-
});
32+
testContext.ConfigureServices(services => services.AddSingleton(loggerFactory));
3633
}
3734

3835
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/ModelStateValidation/AtomicModelStateValidationTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ public AtomicModelStateValidationTests(IntegrationTestContext<TestableStartup<Op
1717
{
1818
_testContext = testContext;
1919

20-
_testContext.ConfigureServices(services =>
21-
{
22-
services.AddSingleton<ISystemClock, FrozenSystemClock>();
23-
});
20+
_testContext.ConfigureServices(services => services.AddSingleton<ISystemClock, FrozenSystemClock>());
2421

2522
testContext.UseController<OperationsController>();
2623
}

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/ResourceDefinitions/Serialization/AtomicSerializationResourceDefinitionTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ public async Task Transforms_on_create_resource_with_side_effects()
4242

4343
List<RecordCompany> newCompanies = _fakers.RecordCompany.Generate(2);
4444

45-
await _testContext.RunOnDatabaseAsync(dbContext =>
46-
{
47-
return dbContext.ClearTableAsync<RecordCompany>();
48-
});
45+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTableAsync<RecordCompany>());
4946

5047
var requestBody = new
5148
{

test/JsonApiDotNetCoreTests/IntegrationTests/AtomicOperations/Transactions/AtomicRollbackTests.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ public async Task Can_rollback_on_error()
2727
DateTimeOffset newBornAt = _fakers.Performer.Generate().BornAt;
2828
string newTitle = _fakers.MusicTrack.Generate().Title;
2929

30-
await _testContext.RunOnDatabaseAsync(dbContext =>
31-
{
32-
return dbContext.ClearTablesAsync<Performer, MusicTrack>();
33-
});
30+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTablesAsync<Performer, MusicTrack>());
3431

3532
string unknownPerformerId = Unknown.StringId.For<Performer, int>();
3633

@@ -113,10 +110,7 @@ public async Task Can_restore_to_previous_savepoint_on_error()
113110
// Arrange
114111
string newTrackTitle = _fakers.MusicTrack.Generate().Title;
115112

116-
await _testContext.RunOnDatabaseAsync(dbContext =>
117-
{
118-
return dbContext.ClearTablesAsync<Performer, MusicTrack>();
119-
});
113+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTablesAsync<Performer, MusicTrack>());
120114

121115
const string trackLid = "track-1";
122116

test/JsonApiDotNetCoreTests/IntegrationTests/Blobs/BlobTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public BlobTests(IntegrationTestContext<TestableStartup<BlobDbContext>, BlobDbCo
1919

2020
testContext.UseController<ImageContainersController>();
2121

22-
testContext.ConfigureServices(services =>
23-
{
24-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
25-
});
22+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
2623
}
2724

2825
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/AcceptHeaderTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,7 @@ public async Task Denies_JsonApi_in_Accept_headers_at_operations_endpoint()
225225
const string route = "/operations";
226226
const string contentType = HeaderConstants.AtomicOperationsMediaType;
227227

228-
Action<HttpRequestHeaders> setRequestHeaders = headers =>
229-
{
230-
headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(HeaderConstants.MediaType));
231-
};
228+
Action<HttpRequestHeaders> setRequestHeaders = headers => headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(HeaderConstants.MediaType));
232229

233230
// Act
234231
(HttpResponseMessage httpResponse, Document responseDocument) =

test/JsonApiDotNetCoreTests/IntegrationTests/CustomRoutes/ApiControllerAttributeLogTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ public ApiControllerAttributeLogTests()
2222
options.AddProvider(_loggerFactory);
2323
});
2424

25-
ConfigureServices(services =>
26-
{
27-
services.AddSingleton(_loggerFactory);
28-
});
25+
ConfigureServices(services => services.AddSingleton(_loggerFactory));
2926
}
3027

3128
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/ModelState/ModelStateValidationTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ public ModelStateValidationTests(IntegrationTestContext<TestableStartup<ModelSta
2323

2424
#if NET6_0
2525
testContext.ConfigureServices(services =>
26-
{
2726
// Polyfill for missing DateOnly/TimeOnly support in .NET 6 ModelState validation.
28-
services.AddDateOnlyTimeOnlyStringConverters();
29-
});
27+
services.AddDateOnlyTimeOnlyStringConverters());
3028
#endif
3129
}
3230

test/JsonApiDotNetCoreTests/IntegrationTests/InputValidation/RequestBody/WorkflowTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ public WorkflowTests(IntegrationTestContext<TestableStartup<WorkflowDbContext>,
1717

1818
testContext.UseController<WorkflowsController>();
1919

20-
testContext.ConfigureServices(services =>
21-
{
22-
services.AddResourceDefinition<WorkflowDefinition>();
23-
});
20+
testContext.ConfigureServices(services => services.AddResourceDefinition<WorkflowDefinition>());
2421
}
2522

2623
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/Links/AbsoluteLinksWithNamespaceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public AbsoluteLinksWithNamespaceTests(IntegrationTestContext<AbsoluteLinksInApi
2525
testContext.UseController<PhotoAlbumsController>();
2626
testContext.UseController<PhotosController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
31-
});
28+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3229

3330
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3431
options.IncludeTotalResourceCount = true;

test/JsonApiDotNetCoreTests/IntegrationTests/Links/AbsoluteLinksWithoutNamespaceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public AbsoluteLinksWithoutNamespaceTests(IntegrationTestContext<AbsoluteLinksNo
2525
testContext.UseController<PhotoAlbumsController>();
2626
testContext.UseController<PhotosController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
31-
});
28+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3229

3330
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3431
options.IncludeTotalResourceCount = true;

test/JsonApiDotNetCoreTests/IntegrationTests/Links/RelativeLinksWithNamespaceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public RelativeLinksWithNamespaceTests(IntegrationTestContext<RelativeLinksInApi
2525
testContext.UseController<PhotoAlbumsController>();
2626
testContext.UseController<PhotosController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
31-
});
28+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3229

3330
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3431
options.IncludeTotalResourceCount = true;

test/JsonApiDotNetCoreTests/IntegrationTests/Links/RelativeLinksWithoutNamespaceTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public RelativeLinksWithoutNamespaceTests(IntegrationTestContext<RelativeLinksNo
2525
testContext.UseController<PhotoAlbumsController>();
2626
testContext.UseController<PhotosController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
31-
});
28+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
3229

3330
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3431
options.IncludeTotalResourceCount = true;

test/JsonApiDotNetCoreTests/IntegrationTests/Logging/LoggingTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ public LoggingTests(IntegrationTestContext<TestableStartup<LoggingDbContext>, Lo
3030
options.AddFilter((category, _) => category != null && category.StartsWith("JsonApiDotNetCore.", StringComparison.Ordinal));
3131
});
3232

33-
testContext.ConfigureServices(services =>
34-
{
35-
services.AddSingleton(loggerFactory);
36-
});
33+
testContext.ConfigureServices(services => services.AddSingleton(loggerFactory));
3734
}
3835

3936
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/Meta/ResponseMetaTests.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public ResponseMetaTests(IntegrationTestContext<TestableStartup<MetaDbContext>,
1919
testContext.UseController<ProductFamiliesController>();
2020
testContext.UseController<SupportTicketsController>();
2121

22-
testContext.ConfigureServices(services =>
23-
{
24-
services.AddSingleton<IResponseMeta, SupportResponseMeta>();
25-
});
22+
testContext.ConfigureServices(services => services.AddSingleton<IResponseMeta, SupportResponseMeta>());
2623

2724
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
2825
options.IncludeTotalResourceCount = false;
@@ -32,10 +29,7 @@ public ResponseMetaTests(IntegrationTestContext<TestableStartup<MetaDbContext>,
3229
public async Task Returns_top_level_meta()
3330
{
3431
// Arrange
35-
await _testContext.RunOnDatabaseAsync(dbContext =>
36-
{
37-
return dbContext.ClearTableAsync<SupportTicket>();
38-
});
32+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTableAsync<SupportTicket>());
3933

4034
const string route = "/supportTickets";
4135

test/JsonApiDotNetCoreTests/IntegrationTests/Meta/TopLevelCountTests.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ public TopLevelCountTests(IntegrationTestContext<TestableStartup<MetaDbContext>,
2121
testContext.UseController<ProductFamiliesController>();
2222
testContext.UseController<SupportTicketsController>();
2323

24-
testContext.ConfigureServices(services =>
25-
{
26-
services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>));
27-
});
24+
testContext.ConfigureServices(services => services.AddScoped(typeof(IResourceChangeTracker<>), typeof(NeverSameResourceChangeTracker<>)));
2825

2926
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3027
options.IncludeTotalResourceCount = true;
@@ -86,10 +83,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
8683
public async Task Renders_resource_count_for_empty_collection()
8784
{
8885
// Arrange
89-
await _testContext.RunOnDatabaseAsync(dbContext =>
90-
{
91-
return dbContext.ClearTableAsync<SupportTicket>();
92-
});
86+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTableAsync<SupportTicket>());
9387

9488
const string route = "/supportTickets";
9589

test/JsonApiDotNetCoreTests/IntegrationTests/Microservices/TransactionalOutboxPattern/OutboxTests.Group.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ public async Task Create_group_writes_to_outbox()
1919

2020
string newGroupName = _fakers.DomainGroup.Generate().Name;
2121

22-
await _testContext.RunOnDatabaseAsync(dbContext =>
23-
{
24-
return dbContext.ClearTableAsync<OutgoingMessage>();
25-
});
22+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTableAsync<OutgoingMessage>());
2623

2724
var requestBody = new
2825
{

test/JsonApiDotNetCoreTests/IntegrationTests/Microservices/TransactionalOutboxPattern/OutboxTests.User.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ public async Task Create_user_writes_to_outbox()
2020
string newLoginName = _fakers.DomainUser.Generate().LoginName;
2121
string newDisplayName = _fakers.DomainUser.Generate().DisplayName!;
2222

23-
await _testContext.RunOnDatabaseAsync(dbContext =>
24-
{
25-
return dbContext.ClearTableAsync<OutgoingMessage>();
26-
});
23+
await _testContext.RunOnDatabaseAsync(dbContext => dbContext.ClearTableAsync<OutgoingMessage>());
2724

2825
var requestBody = new
2926
{

test/JsonApiDotNetCoreTests/IntegrationTests/ReadWrite/Creating/CreateResourceWithClientGeneratedIdTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ public CreateResourceWithClientGeneratedIdTests(IntegrationTestContext<TestableS
2222
testContext.UseController<WorkItemGroupsController>();
2323
testContext.UseController<RgbColorsController>();
2424

25-
testContext.ConfigureServices(services =>
26-
{
27-
services.AddResourceDefinition<ImplicitlyChangingWorkItemGroupDefinition>();
28-
});
25+
testContext.ConfigureServices(services => services.AddResourceDefinition<ImplicitlyChangingWorkItemGroupDefinition>());
2926

3027
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
3128
options.ClientIdGeneration = ClientIdGenerationMode.Required;

test/JsonApiDotNetCoreTests/IntegrationTests/ReadWrite/Updating/Relationships/RemoveFromToManyRelationshipTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ public RemoveFromToManyRelationshipTests(IntegrationTestContext<TestableStartup<
2525
testContext.UseController<WorkItemsController>();
2626
testContext.UseController<WorkItemGroupsController>();
2727

28-
testContext.ConfigureServices(services =>
29-
{
30-
services.AddSingleton<IResourceDefinition<WorkItem, int>, RemoveExtraFromWorkItemDefinition>();
31-
});
28+
testContext.ConfigureServices(services => services.AddSingleton<IResourceDefinition<WorkItem, int>, RemoveExtraFromWorkItemDefinition>());
3229

3330
var workItemDefinition = (RemoveExtraFromWorkItemDefinition)testContext.Factory.Services.GetRequiredService<IResourceDefinition<WorkItem, int>>();
3431
workItemDefinition.Reset();

test/JsonApiDotNetCoreTests/IntegrationTests/ReadWrite/Updating/Resources/ReplaceToManyRelationshipTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ public ReplaceToManyRelationshipTests(IntegrationTestContext<TestableStartup<Rea
2222
testContext.UseController<WorkItemGroupsController>();
2323
testContext.UseController<UserAccountsController>();
2424

25-
testContext.ConfigureServices(services =>
26-
{
27-
services.AddResourceDefinition<ImplicitlyChangingWorkItemDefinition>();
28-
});
25+
testContext.ConfigureServices(services => services.AddResourceDefinition<ImplicitlyChangingWorkItemDefinition>());
2926
}
3027

3128
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/ReadWrite/Updating/Resources/UpdateToOneRelationshipTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ public UpdateToOneRelationshipTests(IntegrationTestContext<TestableStartup<ReadW
2222
testContext.UseController<RgbColorsController>();
2323
testContext.UseController<UserAccountsController>();
2424

25-
testContext.ConfigureServices(services =>
26-
{
27-
services.AddResourceDefinition<ImplicitlyChangingWorkItemDefinition>();
28-
});
25+
testContext.ConfigureServices(services => services.AddResourceDefinition<ImplicitlyChangingWorkItemDefinition>());
2926
}
3027

3128
[Fact]

test/JsonApiDotNetCoreTests/IntegrationTests/ResourceConstructorInjection/ResourceInjectionTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ public ResourceInjectionTests(IntegrationTestContext<TestableStartup<InjectionDb
2121
testContext.UseController<GiftCertificatesController>();
2222
testContext.UseController<PostOfficesController>();
2323

24-
testContext.ConfigureServices(services =>
25-
{
26-
services.AddSingleton<ISystemClock, FrozenSystemClock>();
27-
});
24+
testContext.ConfigureServices(services => services.AddSingleton<ISystemClock, FrozenSystemClock>());
2825

2926
_fakers = new InjectionFakers(testContext.Factory.Services);
3027
}

test/JsonApiDotNetCoreTests/IntegrationTests/ResourceInheritance/ResourceInheritanceReadTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ protected ResourceInheritanceReadTests(IntegrationTestContext<TestableStartup<TD
3535
testContext.UseController<ChromeWheelsController>();
3636
testContext.UseController<CarbonWheelsController>();
3737

38-
testContext.ConfigureServices(services =>
39-
{
40-
services.AddResourceDefinition<WheelSortDefinition>();
41-
});
38+
testContext.ConfigureServices(services => services.AddResourceDefinition<WheelSortDefinition>());
4239

4340
var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService<IJsonApiOptions>();
4441
options.UseRelativeLinks = true;

0 commit comments

Comments
 (0)