public void IfOneCollectionIsNullObjectsAreNotEqual() { var lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = null }; var rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { } }; Assert.That(lhs, Is.Not.EqualTo(rhs)); lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { } }; rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = null }; Assert.That(lhs, Is.Not.EqualTo(rhs)); }
public void IdenticalInCollectionShouldBeEqual() { var lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { new ExternalJobsDashboardViewModel.JobAdvertisement() { Name = "AValue" } } }; var rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { new ExternalJobsDashboardViewModel.JobAdvertisement() { Name = "AValue" } } }; Assert.That(lhs, Is.EqualTo(rhs)); }
public void PropertiesDifferingInCollectionShouldNotBeEqual() { var lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { new ExternalJobsDashboardViewModel.JobAdvertisement() { Name = "AValue" } } }; var rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { new ExternalJobsDashboardViewModel.JobAdvertisement() { Name = "ANotherValue" } } }; Assert.That(lhs, Is.Not.EqualTo(rhs)); }
public void DifferingPropertiesShouldReturnFalse() { var lhs = new ExternalJobsDashboardViewModel() { CompanyState = "SomeState" }; var rhs = new ExternalJobsDashboardViewModel() { CompanyState = "SomeOtherState" }; Assert.That(lhs, Is.Not.EqualTo(rhs)); }
public void IfBothCollectionsAreNullObjectsAreEqual() { var lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = null }; var rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = null }; Assert.That(lhs, Is.EqualTo(rhs)); }
public void DifferingCollectionsShouldNotBeEqual() { var lhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() { new ExternalJobsDashboardViewModel.JobAdvertisement() } }; var rhs = new ExternalJobsDashboardViewModel() { JobAdvertisements = new List <ExternalJobsDashboardViewModel.JobAdvertisement>() }; Assert.That(lhs, Is.Not.EqualTo(rhs)); }