コード例 #1
0
        public void AddLottery()
        {
            Product P = handler.GetProductID("P3");//exist in DL by SQL injection
            LotterySaleManagmentTicket expected = new LotterySaleManagmentTicket("L101", "X", P, DateTime.Parse("01/01/2018"), DateTime.Parse("31/12/2018"));
            LotterySaleManagmentTicket find     = handler.GetLotteryByProductID(P.SystemId);

            Assert.IsNull(find);
            handler.AddLottery(expected);
            find = handler.GetLotteryByProductID(P.SystemId);
            Assert.AreEqual(expected, find);
        }