Skip to content

Commit 5fe1cea

Browse files
committed
update more packages, fix unit test
1 parent 749f806 commit 5fe1cea

File tree

6 files changed

+19
-31
lines changed

6 files changed

+19
-31
lines changed

AzureDevOpsTeamMembersVelocity/Areas/Identity/IdentityHostingStartup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public void Configure(IWebHostBuilder builder)
2626

2727
services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
2828
.AddEntityFrameworkStores<IdentityContext>();
29+
30+
services.AddSingleton<IEmailSender, EmailSender>();
2931
});
3032
}
3133
}

AzureDevOpsTeamMembersVelocity/AzureDevOpsTeamMembersVelocity.csproj

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="AutoCode" Version="1.0.1" />
12+
<PackageReference Include="AutoCode" Version="1.1.1" />
1313
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
1414
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.1" />
1515
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.1" />
16-
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.11.0" />
17-
<PackageReference Include="Microsoft.CodeAnalysis.Razor" Version="5.0.11" />
18-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.11" />
19-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.11" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.11">
16+
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" />
17+
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
18+
<PackageReference Include="Microsoft.CodeAnalysis.Razor" Version="6.0.26" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.1" />
20+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
21+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1">
2122
<PrivateAssets>all</PrivateAssets>
2223
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2324
</PackageReference>
2425
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.1" />
25-
<PackageReference Include="Microsoft.Identity.Web" Version="1.20.0" />
26-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.20.0" />
26+
<PackageReference Include="Microsoft.Identity.Web" Version="2.16.1" />
27+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.16.1" />
2728
<PackageReference Include="Microsoft.TeamFoundation.DistributedTask.Common.Contracts" Version="16.170.0" />
2829
<PackageReference Include="Microsoft.TeamFoundation.DistributedTask.WebApi" Version="16.170.0" />
2930
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />

IntegrationTest/Helpers/HttpClientExtension.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public static Task<HttpResponseMessage> SendAsync(
3636
IHtmlElement submitButton,
3737
IEnumerable<KeyValuePair<string, string>> formValues)
3838
{
39+
if (form == null)
40+
{
41+
throw new ArgumentNullException("form cannot be null to when calling method SendAsync");
42+
}
43+
3944
foreach (var kvp in formValues)
4045
{
4146
var element = Assert.IsAssignableFrom<IHtmlInputElement>(form[kvp.Key]);

IntegrationTest/IntegrationTest.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<ItemGroup>
1010
<PackageReference Include="AngleSharp" Version="1.1.0" />
1111
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.11" />
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.1" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
1414
<PackageReference Include="NSubstitute" Version="5.1.0" />
1515
<PackageReference Include="RichardSzalay.MockHttp" Version="7.0.0" />
1616
<PackageReference Include="xunit" Version="2.6.6" />

UnitTest/StartupTest.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,5 @@ public void ConfigureServices_ExecuteMethod_NoException(Startup sut)
3131

3232
Assert.NotEmpty(servicesCollection);
3333
}
34-
35-
[Theory, AutoVelocityData]
36-
public void Configure_ExecuteMethod_NoException(IWebHostEnvironment webHostEnvir, IConfiguration configuration, Startup sut)
37-
{
38-
var servicesCollection = new ServiceCollection();
39-
Assert.Empty(servicesCollection);
40-
sut.ConfigureServices(servicesCollection);
41-
servicesCollection.AddSingleton(sp => NSubstitute.Substitute.For<IHostApplicationLifetime>());
42-
servicesCollection.AddSingleton(sp => configuration);
43-
var provider = servicesCollection.BuildServiceProvider();
44-
var app = new ApplicationBuilder(provider, NSubstitute.Substitute.For<IFeatureCollection>());
45-
Assert.NotNull(app.ServerFeatures);
46-
47-
sut.Configure(app,
48-
webHostEnvir,
49-
provider,
50-
provider.GetRequiredService<ILogger<Startup>>());
51-
52-
Assert.NotEmpty(servicesCollection);
53-
}
5434
}
5535
}

UnitTest/UnitTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ItemGroup>
1010
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
1111
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
12-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
1313
<PackageReference Include="RichardSzalay.MockHttp" Version="7.0.0" />
1414
<PackageReference Include="xunit" Version="2.6.6" />
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">

0 commit comments

Comments
 (0)