Exemple #1
0
        public async Task CantProcessNullOrder()
        {
            PurchaseOrderProcessingService service = new PurchaseOrderProcessingService();
            var exception = await Record.ExceptionAsync(async() => {
                await service.ProcessPurchaseOrderAsync(null);
            });

            Assert.NotNull(exception);
            Assert.IsType <ArgumentNullException>(exception);
        }
Exemple #2
0
        public async Task CantProcessInvalidOrder()
        {
            PurchaseOrderProcessingService service = new PurchaseOrderProcessingService();
            var ex = await Record.ExceptionAsync(async() => {
                PurchaseOrder order = new PurchaseOrder();
                await service.ProcessPurchaseOrderAsync(order);
            });

            Assert.NotNull(ex);
            Assert.IsType <ValidationErrorException>(ex);
        }
Exemple #3
0
        public void ProcessorsListIsNotEmpty()
        {
            PurchaseOrderProcessingService service = new PurchaseOrderProcessingService();

            Assert.NotEmpty(service.Processors);
        }