public void removeLottery() { Product P = handler.GetProductID("P3");//exist in DL by SQL injection LotterySaleManagmentTicket expected = new LotterySaleManagmentTicket("L102", "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); handler.RemoveLottery(expected); find = handler.GetLotteryByProductID(P.SystemId); Assert.IsNull(find); }