public void GetLotteryByProductID() { Product P = handler.GetProductID("P1"); //exist in DL by SQL injection LotterySaleManagmentTicket expected = new LotterySaleManagmentTicket("L1", "X", P, DateTime.Parse("01/01/2018"), DateTime.Parse("31/12/2018")); //exist in DL by SQL injection LotterySaleManagmentTicket find = handler.GetLotteryByProductID(P.SystemId); Assert.AreEqual(expected, find); }