Skip to content

Commit 68aeb02

Browse files
committed
Fix build errors in IdentityServer4.EntityFramework.Storage
1 parent ea300c9 commit 68aeb02

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

src/EntityFramework.Storage/test/IntegrationTests/Stores/DeviceFlowStoreTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using FluentAssertions;
1+
using FluentAssertions;
22
using IdentityServer4.EntityFramework.DbContexts;
33
using IdentityServer4.EntityFramework.Options;
44
using IdentityServer4.EntityFramework.Stores;
@@ -23,7 +23,7 @@ public class DeviceFlowStoreTests : IntegrationTest<DeviceFlowStoreTests, Persis
2323

2424
public DeviceFlowStoreTests(DatabaseProviderFixture<PersistedGrantDbContext> fixture) : base(fixture)
2525
{
26-
foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<PersistedGrantDbContext>)y)).ToList())
26+
foreach (var options in TestDatabaseProviders.SelectMany(x => x.Select(y => (DbContextOptions<PersistedGrantDbContext>) y)).ToList())
2727
{
2828
using (var context = new PersistedGrantDbContext(options, StoreOptions))
2929
context.Database.EnsureCreated();
@@ -83,7 +83,7 @@ public async Task StoreDeviceAuthorizationAsync_WhenSuccessful_ExpectDataStored(
8383
foundDeviceFlowCodes.Should().NotBeNull();
8484
var deserializedData = new PersistentGrantSerializer().Deserialize<DeviceCode>(foundDeviceFlowCodes?.Data);
8585

86-
deserializedData.CreationTime.Should().BeCloseTo(data.CreationTime);
86+
deserializedData.CreationTime.Should().BeCloseTo(data.CreationTime, TimeSpan.FromSeconds(5));
8787
deserializedData.ClientId.Should().Be(data.ClientId);
8888
deserializedData.Lifetime.Should().Be(data.Lifetime);
8989
}
@@ -213,9 +213,9 @@ public async Task FindByUserCodeAsync_WhenUserCodeExists_ExpectDataRetrievedCorr
213213
var store = new DeviceFlowStore(context, new PersistentGrantSerializer(), FakeLogger<DeviceFlowStore>.Create());
214214
code = await store.FindByUserCodeAsync(testUserCode);
215215
}
216-
217-
code.Should().BeEquivalentTo(expectedDeviceCodeData,
218-
assertionOptions => assertionOptions.Excluding(x=> x.Subject));
216+
217+
code.Should().BeEquivalentTo(expectedDeviceCodeData,
218+
assertionOptions => assertionOptions.Excluding(x => x.Subject));
219219

220220
code.Subject.Claims.FirstOrDefault(x => x.Type == JwtClaimTypes.Subject && x.Value == expectedSubject).Should().NotBeNull();
221221
}
@@ -297,7 +297,7 @@ public async Task UpdateByUserCodeAsync_WhenDeviceCodeAuthorized_ExpectSubjectAn
297297
var unauthorizedDeviceCode = new DeviceCode
298298
{
299299
ClientId = "device_flow",
300-
RequestedScopes = new[] {"openid", "api1"},
300+
RequestedScopes = new[] { "openid", "api1" },
301301
CreationTime = new DateTime(2018, 10, 19, 16, 14, 29),
302302
Lifetime = 300,
303303
IsOpenId = true
@@ -381,13 +381,13 @@ public async Task RemoveByDeviceCodeAsync_WhenDeviceCodeExists_ExpectDeviceCodeD
381381
});
382382
context.SaveChanges();
383383
}
384-
384+
385385
using (var context = new PersistedGrantDbContext(options, StoreOptions))
386386
{
387387
var store = new DeviceFlowStore(context, new PersistentGrantSerializer(), FakeLogger<DeviceFlowStore>.Create());
388388
await store.RemoveByDeviceCodeAsync(testDeviceCode);
389389
}
390-
390+
391391
using (var context = new PersistedGrantDbContext(options, StoreOptions))
392392
{
393393
context.DeviceFlowCodes.FirstOrDefault(x => x.UserCode == testUserCode).Should().BeNull();

src/EntityFramework.Storage/test/UnitTests/Mappers/ApiResourceMappersTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

@@ -15,7 +15,7 @@ public class ApiResourceMappersTests
1515
[Fact]
1616
public void AutomapperConfigurationIsValid()
1717
{
18-
ApiResourceMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid<ApiResourceMapperProfile>();
18+
ApiResourceMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid();
1919
}
2020

2121
[Fact]
@@ -34,11 +34,11 @@ public void Properties_Map()
3434
{
3535
var model = new ApiResource()
3636
{
37-
Description = "description",
38-
DisplayName = "displayname",
39-
Name = "foo",
40-
Scopes = { "foo1", "foo2" },
41-
Enabled = false
37+
Description = "description",
38+
DisplayName = "displayname",
39+
Name = "foo",
40+
Scopes = { "foo1", "foo2" },
41+
Enabled = false
4242
};
4343

4444

@@ -49,10 +49,10 @@ public void Properties_Map()
4949
foo1.Should().NotBeNull();
5050
var foo2 = mappedEntity.Scopes.FirstOrDefault(x => x.Scope == "foo2");
5151
foo2.Should().NotBeNull();
52-
52+
5353

5454
var mappedModel = mappedEntity.ToModel();
55-
55+
5656
mappedModel.Description.Should().Be("description");
5757
mappedModel.DisplayName.Should().Be("displayname");
5858
mappedModel.Enabled.Should().BeFalse();

src/EntityFramework.Storage/test/UnitTests/Mappers/ClientMappersTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

@@ -16,7 +16,7 @@ public class ClientMappersTests
1616
[Fact]
1717
public void AutomapperConfigurationIsValid()
1818
{
19-
ClientMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid<ClientMapperProfile>();
19+
ClientMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid();
2020
}
2121

2222
[Fact]

src/EntityFramework.Storage/test/UnitTests/Mappers/IdentityResourcesMappersTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

@@ -13,7 +13,7 @@ public class IdentityResourcesMappersTests
1313
[Fact]
1414
public void IdentityResourceAutomapperConfigurationIsValid()
1515
{
16-
IdentityResourceMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid<IdentityResourceMapperProfile>();
16+
IdentityResourceMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid();
1717
}
1818

1919
[Fact]

src/EntityFramework.Storage/test/UnitTests/Mappers/PersistedGrantMappersTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

@@ -14,7 +14,7 @@ public class PersistedGrantMappersTests
1414
[Fact]
1515
public void PersistedGrantAutomapperConfigurationIsValid()
1616
{
17-
PersistedGrantMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid<PersistedGrantMapperProfile>();
17+
PersistedGrantMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid();
1818
}
1919

2020
[Fact]
@@ -24,10 +24,10 @@ public void CanMap()
2424
{
2525
ConsumedTime = new System.DateTime(2020, 02, 03, 4, 5, 6)
2626
};
27-
27+
2828
var mappedEntity = model.ToEntity();
2929
mappedEntity.ConsumedTime.Value.Should().Be(new System.DateTime(2020, 02, 03, 4, 5, 6));
30-
30+
3131
var mappedModel = mappedEntity.ToModel();
3232
mappedModel.ConsumedTime.Value.Should().Be(new System.DateTime(2020, 02, 03, 4, 5, 6));
3333

src/EntityFramework.Storage/test/UnitTests/Mappers/ScopeMappersTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
1+
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
33

44

@@ -15,7 +15,7 @@ public class ScopesMappersTests
1515
[Fact]
1616
public void ScopeAutomapperConfigurationIsValid()
1717
{
18-
ScopeMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid<ScopeMapperProfile>();
18+
ScopeMappers.Mapper.ConfigurationProvider.AssertConfigurationIsValid();
1919
}
2020

2121
[Fact]

0 commit comments

Comments
 (0)