Skip to content

Commit

Permalink
test for "empty message" body translation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalac committed Feb 6, 2023
1 parent aac6c2a commit 83612a6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/NServiceBus.Transport.SQS.Tests/TransportMessageTests.cs
Expand Up @@ -205,6 +205,21 @@ public async Task Null_body_is_received_ok()
;
}

[Test]
public async Task Empty_message_string_body_is_received_as_empty()
{
var transportMessage = new TransportMessage()
{
Body = "empty message",
};

var receivedBodyArray = await transportMessage.RetrieveBody(Guid.NewGuid().ToString(), null);
var receivedBody = Encoding.Unicode.GetString(receivedBodyArray);

Assert.IsTrue(string.IsNullOrEmpty(receivedBody));
;
}

const string ExpectedReplyToAddress = "TestReplyToAddress";
static readonly TimeSpan ExpectedTtbr = TimeSpan.MaxValue.Subtract(TimeSpan.FromHours(1));
}
Expand Down

0 comments on commit 83612a6

Please sign in to comment.