public void AddOnlyLatestMembershipData_OldRecordStays_Success_Test() { var testOldRecord = new MembershipData(); testOldRecord.FirstName.CsvNewValue = "testFirstName"; testOldRecord.LastName.CsvNewValue = "testLastName"; testOldRecord.Email.CsvNewValue = "testEmail"; testOldRecord.Address.CsvNewValue = "oldAddress"; testOldRecord.UpdateDate.CsvNewValue = DateTime.Parse("02/15/18 10:00").ToShortDateString(); var testNewRecordWithOlderDate = new MembershipData(); testNewRecordWithOlderDate.FirstName.CsvNewValue = "testFirstName"; testNewRecordWithOlderDate.LastName.CsvNewValue = "testLastName"; testNewRecordWithOlderDate.Email.CsvNewValue = "testEmail"; testNewRecordWithOlderDate.Address.CsvNewValue = "newAddress"; testNewRecordWithOlderDate.UpdateDate.CsvNewValue = DateTime.Parse("02/14/18 11:00").ToShortDateString(); var testList = new List <MembershipData> { testOldRecord }; MembershipHelper.AddOnlyLatestMembershipData(testList, testNewRecordWithOlderDate); Assert.AreEqual(1, testList.Count); Assert.AreEqual("oldAddress", testList.FirstOrDefault().Address.CsvNewValue); }