コード例 #1
0
        public void HandleArraysOfObjectsWithSamePropertyValues()
        {
            var outList = new[] {ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase()};
            var expectedList = new[] {ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase()};

            var propertyNotPassedInfos = outList.PropertiesEqual(expectedList);

            Assert.IsTrue(!propertyNotPassedInfos.Any());
        }
コード例 #2
0
        public void HandleArraysOfBaseTypes()
        {
            var outList = new[] {5, 6, 7};
            var expectedList = new[] {5, 6, 7};

            var propertyNotPassedInfos = outList.PropertiesEqual(expectedList);

            Assert.IsTrue(!propertyNotPassedInfos.Any());
        }
コード例 #3
0
        public void FailIf2EnumerablesHaveUnevenAmounts()
        {
            var outList = new[] {ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase()};
            var expectedList = new[] {ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase()};

            var propertyNotPassedInfos = outList.PropertiesEqual(expectedList);

            Approvals.VerifyAll(propertyNotPassedInfos, "Failed:");
        }
コード例 #4
0
        public void FailIfOneItemInArrayDiffers()
        {
            var outList = new[] {ObjectUnderTest.GetDefaultCase(), new ObjectUnderTest("string2", 4, false, "private property"), ObjectUnderTest.GetDefaultCase()};
            var expectedList = new[] {ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase(), ObjectUnderTest.GetDefaultCase()};

            var propertyNotPassedInfos = outList.PropertiesEqual(expectedList);

            Approvals.VerifyAll(propertyNotPassedInfos, "Failed");
        }
コード例 #5
0
        public void FailIf2BaseValueEnumerablesHaveUnevenAmounts()
        {
            var outList = new[] {5, 6, 7};
            var expectedList = new[] {5, 6};

            var propertyNotPassedInfos = outList.PropertiesEqual(expectedList);

            Approvals.VerifyAll(propertyNotPassedInfos, "Failed:");
        }