Exemple #1
0
        public void AddCommodityTest()
        {
            Customer testCustomer = new Customer {
                name = "测试名称", adress = "测试地址"
            };

            string[]     rightInput = { "苹果", " 可乐", "  香蕉", "耳机 " };
            OrderService test       = new OrderService();

            test.AddOrder(testCustomer.name, testCustomer.adress, rightInput);
            test.AddCommodity("000", "苹果");
            Assert.AreEqual(test.list[0].GetList()[4].com.name, "苹果");
        }