public void EditLotteryInDatabase() { 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")); handler.AddLottery(expected); LotterySaleManagmentTicket find = handler.GetLotteryByProductID(P.SystemId); Assert.AreEqual(expected, find); expected.TotalMoneyPayed = 50; Assert.AreNotEqual(expected, find); handler.EditLotteryInDatabase(expected); find = handler.GetLotteryByProductID("P3"); Assert.AreEqual(expected, find);; }