Exemplo n.º 1
0
        public void TestTrue()
        {
            TestAssert.IsTrue(TestListComparer.ContainSameElements(
                                  new List <int> {
                1
            },
                                  new List <int> {
                1
            }));

            TestAssert.IsTrue(TestListComparer.ContainSameElements(
                                  new List <int> {
                1, 2
            },
                                  new List <int> {
                2, 1
            }));

            TestAssert.IsTrue(TestListComparer.ContainSameElements(
                                  new List <int> {
                1, 2, 3
            },
                                  new List <int> {
                3, 2, 1
            }));

            TestAssert.IsTrue(TestListComparer.ContainSameElements(
                                  new List <int> {
            },
                                  new List <int> {
            }));
        }
        public void TestTrue()
        {
            Assert.That(TestListComparer.ContainSameElements(
                            new List <int> {
                1
            },
                            new List <int> {
                1
            }));

            Assert.That(TestListComparer.ContainSameElements(
                            new List <int> {
                1, 2
            },
                            new List <int> {
                2, 1
            }));

            Assert.That(TestListComparer.ContainSameElements(
                            new List <int> {
                1, 2, 3
            },
                            new List <int> {
                3, 2, 1
            }));

            Assert.That(TestListComparer.ContainSameElements(
                            new List <int>(),
                            new List <int>()));
        }
Exemplo n.º 3
0
        void AssertHasContracts(IEnumerable <Type> expectedValues)
        {
            var contractList = _container.AllContracts.Select(x => x.Type).ToList();
            var expectedList = GetStandardContractTypeInclusions().Concat(expectedValues).ToList();

            Assert.That(
                TestListComparer.ContainSameElements(
                    contractList, expectedList),
                "Unexpected list: " + TestListComparer.PrintList(contractList) + "\nExpected: " + TestListComparer.PrintList(expectedList));
        }
Exemplo n.º 4
0
        public void TestFalse()
        {
            TestAssert.IsFalse(TestListComparer.ContainSameElements(
                                   new List <int> {
                1, 2, 3
            },
                                   new List <int> {
                3, 2, 3
            }));

            TestAssert.IsFalse(TestListComparer.ContainSameElements(
                                   new List <int> {
                1, 2
            },
                                   new List <int> {
                1, 2, 3
            }));
        }
        public void TestFalse()
        {
            Assert.That(!TestListComparer.ContainSameElements(
                            new List <int> {
                1, 2, 3
            },
                            new List <int> {
                3, 2, 3
            }));

            Assert.That(!TestListComparer.ContainSameElements(
                            new List <int> {
                1, 2
            },
                            new List <int> {
                1, 2, 3
            }));
        }