Beispiel #1
0
        public void Test_Deliver_Order_Does_Not_Excist()
        {
            //Arrange
            var repo    = new FakeRepo();
            var service = new OrdersService(repo);

            //Act
            var action = new Action(() => service.DeliverOrder(-150));

            //Assert
            Assert.Throws <KeyNotFoundException>(action);
        }
Beispiel #2
0
        public void Test_GetDeliveredOrders_For_Delivered_prop()
        {
            //Arrange
            var repo    = new FakeRepo();
            var service = new OrdersService(repo);

            //Act
            var orders = service.GetDeliveredOrders();

            //Assert
            Assert.All(orders, o => Assert.True(o.Delivered));
        }
Beispiel #3
0
        public void Test_Deliver_Order_with_Param(int id)
        {
            //Arrange
            var repo    = new FakeRepo();
            var service = new OrdersService(repo);

            //Act
            service.DeliverOrder(id);

            //Assert
            Assert.True(true);
        }