public void ConvertFromRabbitMqDeliveryCommand_HasCorrectParameters(String parameter) { // Arrange var cmdlet = new ConvertFromRabbitMqDeliveryCommand(); // Act // Assert Assert.That(TestHelpers.HasParameterAttribute(cmdlet, parameter), Is.True); }
public void ConvertFromRabbitMqDeliveryCommand_IsCmdlet() { // Arrange var cmdlet = new ConvertFromRabbitMqDeliveryCommand(); // Act // Assert Assert.That(cmdlet is Cmdlet, Is.True); }
public void ConvertFromRabbitMqDeliveryCommand_ReturnsDecodedString() { // Arrange var bytes = System.Text.Encoding.UTF8.GetBytes("Hello"); mockDelivery.Object.Body = bytes; var cmdlet = new ConvertFromRabbitMqDeliveryCommand() { InputObject = mockDelivery.Object }; // Act var enumerator = cmdlet.Invoke().GetEnumerator(); enumerator.MoveNext(); var result = enumerator.Current; // Assert Assert.That(result, Is.EqualTo("Hello")); }