public void ThenWillReturnSameIfBothAreUnset() { var source = new TrainingDateModel(); var target = new TrainingDateModel(); Assert.IsTrue(source.Equals(target)); }
public void ThenWillReturnDifferentIfTargetIsNotSameType() { var source = new TrainingDateModel { StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1) }; Assert.IsFalse(source.Equals(123)); }
public void ThenWillReturnSameIfBothDatesAreSetAndEqual() { var source = new TrainingDateModel { StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1) }; var target = new TrainingDateModel { StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1) }; Assert.IsTrue(source.Equals(target)); }
public void ThenWillReturnDifferentIfEndDatesAreSetAndNotEqual() { var source = new TrainingDateModel { StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(1) }; var target = new TrainingDateModel { StartDate = DateTime.Now, EndDate = DateTime.Now.AddDays(2) }; Assert.IsFalse(source.Equals(target)); }
public void ThenWillReturnSameIfStartDateSetAndEqual() { var source = new TrainingDateModel { StartDate = DateTime.Now }; var target = new TrainingDateModel { StartDate = DateTime.Now }; Assert.IsTrue(source.Equals(target)); }