public async Task MessageBodyReturnsNullStream_IfNoMessageLocationIsSpecified() { // Arrange StubMessageEntity sut = CreateMessageEntity(messageLocation: null); // Act using (Stream actualStream = await sut.RetrieveMessageBody(store: null)) { // Assert Assert.Null(actualStream); } }
public async Task MessageEntityCatchesInvalidMessageBodyRetrieval() { // Arrange StubMessageEntity sut = CreateMessageEntity(messageLocation: "ignored"); var stubProvider = new MessageBodyStore(); stubProvider.Accept(condition: s => true, persister: new SaboteurMessageBodyStore()); // Act using (Stream actualStream = await sut.RetrieveMessageBody(stubProvider)) { // Assert Assert.Null(actualStream); } }