Ejemplo n.º 1
0
        public void GetAllLeftElementsTest_GivenANonBlankBijective()
        {
            var bijective                   = BijectiveTestsHelper.GetBijective1();
            var allLeftElements             = bijective.GetAllLeftElements();
            var allLeftElementsList         = new List <string>(allLeftElements);
            var expectedAllLeftElementsList = BijectiveTestsHelper.GetAllLeftElements1();

            CollectionAssert.AreEquivalent(expectedAllLeftElementsList, allLeftElementsList);
        }
Ejemplo n.º 2
0
        public void GetAllReverseBijectionsTest_GivenANonBlankBijective()
        {
            var bijective = BijectiveTestsHelper.GetBijective1();

            var allReverseBijections     = bijective.GetAllReverseBijections();
            var allReverseBijectionsList = new List <Tuple <int, string> >(allReverseBijections);

            var expectedAllReverseBijectionsList = BijectiveTestsHelper.GetAllReverseBijections1();

            CollectionAssert.AreEquivalent(expectedAllReverseBijectionsList, allReverseBijectionsList);
        }
Ejemplo n.º 3
0
        public void ClearTest_GivenANonBlankBijective()
        {
            var bijective = BijectiveTestsHelper.GetBijective1();

            bijective.Clear();

            var allBijections = bijective.GetAllBijections();

            Assert.AreEqual(0, new List <Tuple <string, int> >(allBijections).Count);

            var allReverseBijections = bijective.GetAllReverseBijections();

            Assert.AreEqual(0, new List <Tuple <int, string> >(allReverseBijections).Count);

            var allItemsLeft = bijective.GetAllLeftElements();

            Assert.AreEqual(0, new List <string>(allItemsLeft).Count);

            var allItemsRight = bijective.GetAllRightElements();

            Assert.AreEqual(0, new List <int>(allItemsRight).Count);
        }