Skip to content

Commit 061c357

Browse files
committed
remove BeJson overload
1 parent 531ebd8 commit 061c357

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Diff for: test/OpenApiTests/JsonElementExtensions.cs

-7
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,5 @@ public void ContainProperty(string propertyName)
7575
Execute.Assertion.ForCondition(_subject.TryGetProperty(propertyName, out _))
7676
.FailWith($"Expected JSON element '{escapedJson}' to contain a property named '{propertyName}'.");
7777
}
78-
79-
public void BeJson(string expectedDocument)
80-
{
81-
string json = _subject.ToString();
82-
83-
json.Should().BeJson(expectedDocument);
84-
}
8578
}
8679
}

Diff for: test/OpenApiTests/LegacyOpenApiIntegration/LegacyOpenApiIntegrationTests.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System.Reflection;
22
using System.Text.Json;
3+
using FluentAssertions;
4+
using TestBuildingBlocks;
35
using Xunit;
46

57
namespace OpenApiTests.LegacyOpenApiIntegration;
@@ -21,10 +23,11 @@ public async Task Retrieved_document_matches_expected_document()
2123
string expectedDocument = await LoadEmbeddedResourceAsync(embeddedResourceName);
2224

2325
// Act
24-
JsonElement actualDocument = await LazyDocument.Value;
26+
JsonElement jsonElement = await LazyDocument.Value;
2527

2628
// Assert
27-
actualDocument.Should().BeJson(expectedDocument);
29+
string jsonText = jsonElement.ToString();
30+
jsonText.Should().BeJson(expectedDocument);
2831
}
2932

3033
private static async Task<string> LoadEmbeddedResourceAsync(string name)

0 commit comments

Comments
 (0)