Skip to content

Commit

Permalink
test: use raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualBean committed Mar 30, 2024
1 parent 0199420 commit 7e7dca3
Show file tree
Hide file tree
Showing 20 changed files with 1,388 additions and 1,260 deletions.
604 changes: 305 additions & 299 deletions test/LEGO.AsyncAPI.Tests/AsyncApiDocumentV2Tests.cs

Large diffs are not rendered by default.

24 changes: 14 additions & 10 deletions test/LEGO.AsyncAPI.Tests/AsyncApiLicenseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ public class AsyncApiLicenseTests : TestBase
[Test]
public void Serialize_WithAllProperties_Serializes()
{
var expected = @"{
""name"": ""test"",
""url"": ""https://example.com/license"",
""x-extension"": ""value""
}";
var expected = """
{
"name": "test",
"url": "https://example.com/license",
"x-extension": "value"
}
""";
var license = new AsyncApiLicense()
{
Name = "test",
Expand Down Expand Up @@ -54,11 +56,13 @@ public static Stream GenerateStreamFromString(string s)
public void LoadLicense_WithJson_Deserializes()
{
// Arrange
var input = @"{
""name"": ""test"",
""url"": ""https://example.com/license"",
""x-extension"": ""value""
}";
var input = """
{
"name": "test",
"url": "https://example.com/license",
"x-extension": "value"
}
""";

using (var stream = GenerateStreamFromString(input))
{
Expand Down
Loading

0 comments on commit 7e7dca3

Please sign in to comment.