10 files changed +41
-20
lines changed Original file line number Diff line number Diff line change 1
1
version : ' {build}'
2
- image : Visual Studio 2019
2
+ image : Visual Studio 2022
3
3
configuration : Release
4
4
5
5
before_build :
Original file line number Diff line number Diff line change 1
1
{
2
2
"msbuild-sdks" : {
3
- "MSBuild.Sdk.Extras" : " 2 .0.54 "
3
+ "MSBuild.Sdk.Extras" : " 3 .0.44 "
4
4
}
5
5
}
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >netcoreapp2.1;netcoreapp3.0</TargetFrameworks >
4
+ <TargetFrameworks >netcoreapp2.1;netcoreapp3.0;net6.0 </TargetFrameworks >
5
5
6
6
<IsPackable >false</IsPackable >
7
7
</PropertyGroup >
Original file line number Diff line number Diff line change 1
- <Project Sdk =" Microsoft.NET.Sdk.Web" >
1
+ <Project Sdk =" Microsoft.NET.Sdk.Web" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >netcoreapp2.1;netcoreapp3.0</TargetFrameworks >
4
+ <TargetFrameworks >netcoreapp2.1;netcoreapp3.0;net6.0 </TargetFrameworks >
5
5
</PropertyGroup >
6
6
7
7
<ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp2.1'" >
8
- <PackageReference Include =" Microsoft.AspNetCore.All" Version =" 2.1.4 " />
8
+ <PackageReference Include =" Microsoft.AspNetCore.All" Version =" 2.1.34 " />
9
9
</ItemGroup >
10
10
11
11
<ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.0'" >
Original file line number Diff line number Diff line change 3
3
using Microsoft . Extensions . Configuration ;
4
4
using Microsoft . Extensions . DependencyInjection ;
5
5
using Microsoft . Extensions . Logging ;
6
+ #if NETCOREAPP3_0_OR_GREATER
7
+ using Microsoft . Extensions . Hosting ;
8
+ #endif
6
9
7
10
namespace FluentAssertions . AspNetCore . Mvc . Sample
8
11
{
9
12
public class Startup
10
13
{
11
- public Startup ( IHostingEnvironment env )
14
+ public Startup (
15
+ #if NETCOREAPP3_0_OR_GREATER
16
+ IWebHostEnvironment env
17
+ #else
18
+ IHostingEnvironment env
19
+ #endif
20
+ )
12
21
{
13
22
var builder = new ConfigurationBuilder ( )
14
23
. SetBasePath ( env . ContentRootPath )
@@ -39,7 +48,13 @@ public void ConfigureServices(IServiceCollection services)
39
48
}
40
49
41
50
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
42
- public void Configure ( IApplicationBuilder app , IHostingEnvironment env , ILoggerFactory loggerFactory )
51
+ public void Configure ( IApplicationBuilder app ,
52
+ #if NETCOREAPP3_0_OR_GREATER
53
+ IWebHostEnvironment env ,
54
+ #else
55
+ IHostingEnvironment env ,
56
+ #endif
57
+ ILoggerFactory loggerFactory )
43
58
{
44
59
if ( env . IsDevelopment ( ) )
45
60
{
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" MSBuild.Sdk.Extras" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >netstandard2.0;netcoreapp3.0</TargetFrameworks >
4
+ <TargetFrameworks >netstandard2.0;netcoreapp3.0;net6.0 </TargetFrameworks >
5
5
</PropertyGroup >
6
6
7
- <ItemGroup >
8
- <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
9
- </ItemGroup >
7
+ <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
8
+ <PackageReference Include =" FluentAssertions" Version =" 6.6.0" />
9
+ <FrameworkReference Include =" Microsoft.AspNetCore.App" />
10
+ </ItemGroup >
10
11
11
12
<ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
13
+ <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
12
14
<PackageReference Include =" Microsoft.AspNetCore.Mvc" Version =" 2.1.0" />
13
15
</ItemGroup >
14
16
15
17
<ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.0'" >
18
+ <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
16
19
<FrameworkReference Include =" Microsoft.AspNetCore.App" />
17
20
</ItemGroup >
18
21
Original file line number Diff line number Diff line change 5
5
<Copyright >Copyright 2018</Copyright >
6
6
<AssemblyTitle >Fluent Assertions extensions for ASP.NET Core MVC</AssemblyTitle >
7
7
<Title >Fluent Assertions for ASP.NET Core MVC</Title >
8
- <VersionPrefix >4.2 .0</VersionPrefix >
8
+ <VersionPrefix >4.3 .0</VersionPrefix >
9
9
<Authors >Casey Burns;Kevin Kuszyk</Authors >
10
- <TargetFrameworks >netstandard2.0;netcoreapp3.0</TargetFrameworks >
10
+ <TargetFrameworks >netstandard2.0;netcoreapp3.0;net6.0 </TargetFrameworks >
11
11
<AssemblyName >FluentAssertions.AspNetCore.Mvc</AssemblyName >
12
12
<PackageId >FluentAssertions.AspNetCore.Mvc</PackageId >
13
13
<PackageTags >TDD;Fluent;Mvc;AspNetMvc;aspnetcore;aspnetcoremvc</PackageTags >
23
23
<OutputPath >bin\$(Configuration)\$(TargetFramework)\</OutputPath >
24
24
</PropertyGroup >
25
25
26
- <ItemGroup >
27
- <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
28
- </ItemGroup >
26
+ <ItemGroup Condition =" '$(TargetFramework)' == 'net6.0'" >
27
+ <PackageReference Include =" FluentAssertions" Version =" 6.6.0" />
28
+ <FrameworkReference Include =" Microsoft.AspNetCore.App" />
29
+ </ItemGroup >
29
30
30
31
<ItemGroup Condition =" '$(TargetFramework)' == 'netstandard2.0'" >
32
+ <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
31
33
<PackageReference Include =" Microsoft.AspNetCore.Mvc" Version =" 2.1.0" />
32
34
</ItemGroup >
33
35
34
36
<ItemGroup Condition =" '$(TargetFramework)' == 'netcoreapp3.0'" >
37
+ <PackageReference Include =" FluentAssertions" Version =" 6.0.0" />
35
38
<FrameworkReference Include =" Microsoft.AspNetCore.App" />
36
39
</ItemGroup >
37
40
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public JsonResultAssertions(JsonResult subject) : base(subject)
30
30
/// <summary>
31
31
/// The <see cref="JsonResult.SerializerSettings"/> on the tested subject.
32
32
/// </summary>
33
- #if NETCOREAPP3_0
33
+ #if NETCOREAPP3_0_OR_GREATER
34
34
public object SerializerSettings => JsonResultSubject . SerializerSettings ;
35
35
#else
36
36
public Newtonsoft . Json . JsonSerializerSettings SerializerSettings => JsonResultSubject . SerializerSettings ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public void BeActionResult_GivenActionResultOfTValue_ShouldReturnActionResultAss
29
29
30
30
var result = subject . Should ( ) . BeActionResult < object > ( ) ;
31
31
32
- result . Should ( ) . BeOfType < ActionResultAssertions < object > > ( ) ;
32
+ Assert . IsType < ActionResultAssertions < object > > ( result ) ;
33
33
}
34
34
35
35
[ Fact ]
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
- <TargetFrameworks >netcoreapp2.1;netcoreapp3.0</TargetFrameworks >
4
+ <TargetFrameworks >netcoreapp2.1;netcoreapp3.0;net6.0 </TargetFrameworks >
5
5
6
6
<IsPackable >false</IsPackable >
7
7
</PropertyGroup >
0 commit comments