Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public void ProcessorsListIsNotEmpty()
        {
            PurchaseOrderProcessingService service = new PurchaseOrderProcessingService();

            Assert.NotEmpty(service.Processors);
        }