Skip to content

Commit 70f9c2f

Browse files
committed
Use one source, resolve versions by preprocessor directives
1 parent 2472e08 commit 70f9c2f

File tree

43 files changed

+2408
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2408
-39
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageVersion Include="FluentAssertions" Version="8.0.0" />
9+
<PackageVersion Include="FluentAssertions" Version="[6.5.1,8.0.0)" />
1010
<PackageVersion Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0" />
1111
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
1212
<PackageVersion Include="System.Text.Json" Version="8.0.5" />

FluentAssertions.Web.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Api.Net80", "samples
4646
EndProject
4747
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Api.Net90", "samples\Sample.Api.Net90\Sample.Api.Net90.csproj", "{73E11379-908A-4BA0-9365-AE800A88C39B}"
4848
EndProject
49+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Web.v8", "src\FluentAssertions.Web.v8\FluentAssertions.Web.v8.csproj", "{3872DF64-5DA9-4983-90D8-2802A0A26CFE}"
50+
EndProject
51+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample.Api.v8.Tests", "test\Sample.Api.v8.Tests\Sample.Api.v8.Tests.csproj", "{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1}"
52+
EndProject
53+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Web.v8.Tests", "test\FluentAssertions.Web.v8.Tests\FluentAssertions.Web.v8.Tests.csproj", "{056E517C-F644-4B8A-9494-09276E6E3C6B}"
54+
EndProject
55+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Web.Types", "src\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj", "{455E5F41-B678-4286-BB4D-FC232D08CAC0}"
56+
EndProject
4957
Global
5058
GlobalSection(SolutionConfigurationPlatforms) = preSolution
5159
Debug|Any CPU = Debug|Any CPU
@@ -84,6 +92,22 @@ Global
8492
{73E11379-908A-4BA0-9365-AE800A88C39B}.Debug|Any CPU.Build.0 = Debug|Any CPU
8593
{73E11379-908A-4BA0-9365-AE800A88C39B}.Release|Any CPU.ActiveCfg = Release|Any CPU
8694
{73E11379-908A-4BA0-9365-AE800A88C39B}.Release|Any CPU.Build.0 = Release|Any CPU
95+
{3872DF64-5DA9-4983-90D8-2802A0A26CFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
96+
{3872DF64-5DA9-4983-90D8-2802A0A26CFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
97+
{3872DF64-5DA9-4983-90D8-2802A0A26CFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
98+
{3872DF64-5DA9-4983-90D8-2802A0A26CFE}.Release|Any CPU.Build.0 = Release|Any CPU
99+
{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
100+
{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
101+
{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
102+
{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1}.Release|Any CPU.Build.0 = Release|Any CPU
103+
{056E517C-F644-4B8A-9494-09276E6E3C6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
104+
{056E517C-F644-4B8A-9494-09276E6E3C6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
105+
{056E517C-F644-4B8A-9494-09276E6E3C6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
106+
{056E517C-F644-4B8A-9494-09276E6E3C6B}.Release|Any CPU.Build.0 = Release|Any CPU
107+
{455E5F41-B678-4286-BB4D-FC232D08CAC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
108+
{455E5F41-B678-4286-BB4D-FC232D08CAC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
109+
{455E5F41-B678-4286-BB4D-FC232D08CAC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
110+
{455E5F41-B678-4286-BB4D-FC232D08CAC0}.Release|Any CPU.Build.0 = Release|Any CPU
87111
EndGlobalSection
88112
GlobalSection(SolutionProperties) = preSolution
89113
HideSolutionNode = FALSE
@@ -98,6 +122,10 @@ Global
98122
{538479CE-5922-4FF9-A09D-80C9E91FFFF1} = {BFF7517A-C9EA-458D-829E-28A10F8D61BF}
99123
{9B53847C-0D39-46AB-9E39-A2DCA0676D88} = {B6E9FBF3-AC48-48B0-9CBB-CA260F59CCD9}
100124
{73E11379-908A-4BA0-9365-AE800A88C39B} = {B6E9FBF3-AC48-48B0-9CBB-CA260F59CCD9}
125+
{3872DF64-5DA9-4983-90D8-2802A0A26CFE} = {14FDD52D-B83A-445B-BD2F-04B3E7B8033C}
126+
{EBB6D06F-B87F-4BDA-8F1B-A6E88C96C2E1} = {BFF7517A-C9EA-458D-829E-28A10F8D61BF}
127+
{056E517C-F644-4B8A-9494-09276E6E3C6B} = {BFF7517A-C9EA-458D-829E-28A10F8D61BF}
128+
{455E5F41-B678-4286-BB4D-FC232D08CAC0} = {14FDD52D-B83A-445B-BD2F-04B3E7B8033C}
101129
EndGlobalSection
102130
GlobalSection(ExtensibilityGlobals) = postSolution
103131
SolutionGuid = {81F41C75-2F8A-4E70-BA17-38146C4BB6E6}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ artifacts:
7171
deploy:
7272
- provider: NuGet
7373
api_key:
74-
secure: vSWvi7ciU2pZZmpcXGvvR0APUpesgZBAScxNcBUttDHuWhgEAFS5fEeEiFFl5wl6
74+
secure: Ihowbb270n9ZDddCMfVAwAUNrEJ+Okjsld802+/Qw+cGxx3/ih8ToDxU8OxQ4sq9
7575
skip_symbols: true
7676
artifact: /.*\.nupkg/
7777
on:

readme.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ This is a [*FluentAssertions*](https://fluentassertions.com/) extension over the
33

44
It provides assertions specific to HTTP responses and outputs rich erros messages when the tests fail, so less time with debugging is spent.
55

6-
[![Build status](https://ci.appveyor.com/api/projects/status/93qtbyftww0snl4x/branch/master?svg=true)](https://ci.appveyor.com/project/adrianiftode/fluentassertions-web/branch/master)
7-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adrianiftode_FluentAssertions.Web&metric=alert_status)](https://sonarcloud.io/project/overview?id=adrianiftode_FluentAssertions.Web)
8-
[![NuGet](https://img.shields.io/nuget/v/FluentAssertions.Web.svg)](https://www.nuget.org/packages/FluentAssertions.Web)
9-
106
```csharp
117
[Fact]
128
public async Task Post_ReturnsOk()
@@ -49,6 +45,26 @@ Once the response is ready you'll want to assert it. With first level properties
4945

5046
![FailedTest1](https://github.com/adrianiftode/FluentAssertions.Web/blob/master/docs/images/FailedTest1.png?raw=true)
5147

48+
### Status
49+
50+
[![Build status](https://ci.appveyor.com/api/projects/status/93qtbyftww0snl4x/branch/master?svg=true)](https://ci.appveyor.com/project/adrianiftode/fluentassertions-web/branch/master)
51+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adrianiftode_FluentAssertions.Web&metric=alert_status)](https://sonarcloud.io/project/overview?id=adrianiftode_FluentAssertions.Web)
52+
[![NuGet](https://img.shields.io/nuget/v/FluentAssertions.Web.svg)](https://www.nuget.org/packages/FluentAssertions.Web)
53+
[![NuGet FA v8](https://img.shields.io/nuget/v/FluentAssertions.Web.svg)](https://www.nuget.org/packages/FluentAssertions.Web.v8)
54+
55+
### Getting started
56+
57+
If you are using FluentAssertions < 8.0.0
58+
```
59+
dotnet add package FluentAssertions.Web
60+
```
61+
62+
If you are using FluentAssertions >= 8.0.0
63+
64+
```
65+
dotnet add package FluentAssertions.Web.v8
66+
```
67+
5268
### FluentAssertions.Web Examples
5369

5470
- Asserting that the response content of a HTTP POST request is equivalent to a certain object
@@ -333,3 +349,9 @@ This library can still be used with FluentAssertions and it did not become obsol
333349

334350
When FluentAssertions.Web was created, [FluentAssertions.Http](https://github.com/balanikas/FluentAssertions.Http) also existed at the time, solving the same problem when considering the asserting language.
335351
Besides the extra assertions added by FluentAssertions.Web, an important effort is put by this library on what happens when a test fails.
352+
353+
**FluentAssertions 8.0.0 and beyond**
354+
355+
Starting 8.0.0, FA is not an FOSS anymore. **FluentAssertions.Web** will maintain both FOSS (< 8.0.0) and the Commercial versions of FA (>= 8.0.0), so they will be deployed as separate Nuget packages:
356+
- **FluentAssertions.Web** will continue to dependend on the FOSS versions
357+
- **FluentAssertions.Web.v8** will dependend on the Commercial versions

src/Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@
2020
<GenerateDocumentationFile>True</GenerateDocumentationFile>
2121
</PropertyGroup>
2222

23-
<ItemGroup>
24-
<PackageReference Include="FluentAssertions" />
25-
</ItemGroup>
26-
2723
</Project>
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<PackageId>FluentAssertions.Web.v8.Serializers.NewtonsoftJson</PackageId>
54
<PackageDescription>
65
NewtonsoftJson based serializer for FluentAssertions.Web
76
</PackageDescription>
@@ -12,7 +11,7 @@
1211
</ItemGroup>
1312

1413
<ItemGroup>
15-
<ProjectReference Include="..\FluentAssertions.Web\FluentAssertions.Web.csproj" />
14+
<ProjectReference Include="..\FluentAssertions.Web.Types\FluentAssertions.Web.Types.csproj" />
1615
</ItemGroup>
17-
16+
1817
</Project>

src/FluentAssertions.Web/DeserializationException.cs renamed to src/FluentAssertions.Web.Types/DeserializationException.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// ReSharper disable once CheckNamespace
2+
using System;
23
using System.Runtime.Serialization;
34

45
namespace FluentAssertions;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<ItemGroup>
3+
<PackageReference Include="System.Text.Json" />
4+
</ItemGroup>
5+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
global using FluentAssertions.Web.Internal.Serializers;
2+
global using System;
3+
global using System.IO;
4+
global using System.Text.Json;
5+
global using System.Threading.Tasks;

0 commit comments

Comments
 (0)