public void TestEquals2() { InsurancePolicy card = new InsurancePolicy() { Number = 1, Name = "Alex", Surname = "Ivanov", Middlename = "Ivanovich", Sex = "men", DateOfBirth = new DateTime(2002, 10, 10), InsuranceNumber = "685FJ9765BG" }; InsurancePolicy card1 = new InsurancePolicy() { Number = card.Number, Name = card.Name, Surname = card.Surname, Middlename = card.Middlename, Sex = card.Sex, DateOfBirth = card.DateOfBirth, InsuranceNumber = card.InsuranceNumber }; var actual = card.Equals(card1); Assert.IsTrue(actual); }