Skip to content

Commit

Permalink
Fixed the merge conflicts after updating to main
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronMayne committed Mar 28, 2024
1 parent 27b2693 commit 9d6b0c7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 50 deletions.
20 changes: 8 additions & 12 deletions test/LEGO.AsyncAPI.Tests/Bindings/AMQP/AMQPBindings_Should.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ public void AMQPChannelBinding_WithRoutingKey_SerializesAndDeserializes()
var actual = channel.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);

// Assert
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.AMQP;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiChannel>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(channel);
}

Expand Down Expand Up @@ -89,14 +88,13 @@ public void AMQPChannelBinding_WithQueue_SerializesAndDeserializes()
var actual = channel.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);

// Assert
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.AMQP;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiChannel>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(channel);
}

Expand All @@ -120,14 +118,13 @@ public void AMQPMessageBinding_WithFilledObject_SerializesAndDeserializes()

// Act
var actual = message.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.AMQP;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiMessage>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(message);
}

Expand Down Expand Up @@ -166,15 +163,14 @@ public void AMQPOperationBinding_WithFilledObject_SerializesAndDeserializes()

// Act
var actual = operation.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();

var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.AMQP;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiOperation>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(operation);
}
}
Expand Down
39 changes: 10 additions & 29 deletions test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,15 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReportGenerator" Version="5.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
<AdditionalFiles Include="stylecop.json" />
<None Include="..\..\.editorconfig" Link=".editorconfig" />
<None Update="TestData\**" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>
<ItemGroup>
<Compile Remove="Attributes\**" />
<EmbeddedResource Remove="Attributes\**" />
<None Remove="Attributes\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.7.0" />
<PackageReference Include="LiquidTestReports.Markdown" Version="1.0.9" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="JsonSchema.Net" Version="2.0.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ReportGenerator" Version="5.1.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Bindings\LEGO.AsyncAPI.Bindings.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI.Readers\LEGO.AsyncAPI.Readers.csproj" />
<ProjectReference Include="..\..\src\LEGO.AsyncAPI\LEGO.AsyncAPI.csproj" />
<AdditionalFiles Include="stylecop.json" />
<None Include="..\..\.editorconfig" Link=".editorconfig" />
<None Update="TestData\**" CopyToOutputDirectory="PreserveNewest"/>
</ItemGroup>
</Project>
15 changes: 6 additions & 9 deletions test/LEGO.AsyncAPI.Tests/MQTT/MQTTBindings_Should.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ public void MQTTServerBinding_FilledObject_SerializesAndDeserializes()
var actual = server.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);

// Assert
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.MQTT;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiServer>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(server);
}

Expand All @@ -86,15 +85,14 @@ public void MQTTOperationBinding_WithFilledObject_SerializesAndDeserializes()

// Act
var actual = operation.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();

var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.MQTT;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiOperation>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(operation);
}

Expand Down Expand Up @@ -124,14 +122,13 @@ public void MQTTMessageBinding_WithFilledObject_SerializesAndDeserializes()

// Act
var actual = message.SerializeAsYaml(AsyncApiVersion.AsyncApi2_0);
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
var settings = new AsyncApiReaderSettings();
settings.Bindings = BindingsCollection.MQTT;
var binding = new AsyncApiStringReader(settings).ReadFragment<AsyncApiMessage>(actual, AsyncApiVersion.AsyncApi2_0, out _);

// Assert
Assert.AreEqual(expected, actual);
actual.Should()
.BePlatformAgnosticEquivalentTo(expected);
binding.Should().BeEquivalentTo(message);
}
}
Expand Down

0 comments on commit 9d6b0c7

Please sign in to comment.