public void NotifyDeadLetterMessageAsyncValidatesTheOrder(string orderId) { var notifier = new UnderTest.EmailNotifier(new EmailNotifierConfiguration(), Mock.Of <ILogger>()); Action actionUnderTest = () => notifier.NotifyDeadLetterMessageAsync("SubmitOrder", "Bob", orderId, "blue").GetAwaiter().GetResult(); actionUnderTest.ShouldThrow <ArgumentException>("because the orderId is required").And.ParamName.Should().Be(nameof(orderId), "because the orderId was invalid"); }
public void NotifyDeadLetterMessageAsyncValidatesThePartner(string partner) { var notifier = new UnderTest.EmailNotifier(new EmailNotifierConfiguration(), Mock.Of <ILogger>()); Action actionUnderTest = () => notifier.NotifyDeadLetterMessageAsync("ProcessOrder", partner, "ABC", "blue").GetAwaiter().GetResult(); actionUnderTest.ShouldThrow <ArgumentException>("because the partner is required").And.ParamName.Should().Be(nameof(partner), "because the partner was invalid"); }