diff --git a/test/LEGO.AsyncAPI.Tests/Bindings/AMQP/AMQPBindings_Should.cs b/test/LEGO.AsyncAPI.Tests/Bindings/AMQP/AMQPBindings_Should.cs index e9178311..7dce6ed3 100644 --- a/test/LEGO.AsyncAPI.Tests/Bindings/AMQP/AMQPBindings_Should.cs +++ b/test/LEGO.AsyncAPI.Tests/Bindings/AMQP/AMQPBindings_Should.cs @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(channel); } @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(channel); } @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(message); } @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(operation); } } diff --git a/test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj b/test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj index 83651e8e..3249426d 100644 --- a/test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj +++ b/test/LEGO.AsyncAPI.Tests/LEGO.AsyncAPI.Tests.csproj @@ -20,34 +20,15 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/test/LEGO.AsyncAPI.Tests/MQTT/MQTTBindings_Should.cs b/test/LEGO.AsyncAPI.Tests/MQTT/MQTTBindings_Should.cs index 3ee233d3..c91187ca 100644 --- a/test/LEGO.AsyncAPI.Tests/MQTT/MQTTBindings_Should.cs +++ b/test/LEGO.AsyncAPI.Tests/MQTT/MQTTBindings_Should.cs @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(server); } @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(operation); } @@ -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(actual, AsyncApiVersion.AsyncApi2_0, out _); // Assert - Assert.AreEqual(expected, actual); + actual.Should() + .BePlatformAgnosticEquivalentTo(expected); binding.Should().BeEquivalentTo(message); } }