コード例 #1
0
        public void GetLoyalCustomerDiscount()
        {
            var customer      = CustomerFactory.CreateCustomerInstanceBasedOnOrderQty(110);
            var loyalCustomer = Assert.IsType <LoyalCustomer>(customer);

            Assert.Equal(10, loyalCustomer.LoyalCustomerDiscount);
        }
コード例 #2
0
        public void GetCustomerBasedOnOrderLessOrEqualTo100()
        {
            var customer = CustomerFactory.CreateCustomerInstanceBasedOnOrderQty(80);

            //This shows a warning to not use it, this will return void and can not be extended, means, we can not look into the object built.
            //Assert.IsType(typeof(Customer), customer);
            Assert.IsType <Customer>(customer);
        }