public void SavePendingOrderAsyncVerifiesTheOrderIsPresent() { var config = new OrderSubmissionBlobStorageConfiguration { StorageConnectionString = "hey, connect to storage!", PendingContainer = "the place where stuff lives" }; var storage = new OrderSubmissionBlobStorage(config, null); Action actionUnderTest = () => storage.SavePendingOrderAsync("partner", "order-id", null).GetAwaiter().GetResult(); actionUnderTest.ShouldThrow <ArgumentNullException>("because the order is required"); }
public void SavePendingOrderAsyncValidatesTheOrderId() { var config = new OrderSubmissionBlobStorageConfiguration { StorageConnectionString = "hey, connect to storage!", PendingContainer = "the place where stuff lives" }; var partner = "ABC123"; var orderId = (string)null; var order = new CreateOrderMessage(); var storage = new OrderSubmissionBlobStorage(config, null); Action actionUnderTest = () => storage.SavePendingOrderAsync(partner, orderId, order).GetAwaiter().GetResult(); actionUnderTest.ShouldThrow <ArgumentException>("because the order id is required").And.ParamName.Should().Be(nameof(orderId)); }