コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        public void DifferingPropertiesShouldReturnFalse()
        {
            var lhs = new ExternalJobsDashboardViewModel()
            {
                CompanyState = "SomeState"
            };
            var rhs = new ExternalJobsDashboardViewModel()
            {
                CompanyState = "SomeOtherState"
            };

            Assert.That(lhs, Is.Not.EqualTo(rhs));
        }
コード例 #5
0
        public void IfBothCollectionsAreNullObjectsAreEqual()
        {
            var lhs = new ExternalJobsDashboardViewModel()
            {
                JobAdvertisements = null
            };
            var rhs = new ExternalJobsDashboardViewModel()
            {
                JobAdvertisements = null
            };

            Assert.That(lhs, Is.EqualTo(rhs));
        }
コード例 #6
0
        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));
        }