예제 #1
0
        public void PermutationTest()
        {
            OrderedSet <int> actual = new OrderedSet <int> {
                10, 12, 45, 1
            };

            Assert.AreEqual(12, actual.Permutations(2));
        }
예제 #2
0
파일: SetsTest.cs 프로젝트: wsgan001/asegrp
 public void PerumtationsEmptySetPUT(OrderedSet <int> actual, int actualVal)
 {
     if (actual == null)
     {
         actual.Permutations(actualVal);
         PexAssert.IsTrue(false, "ArgumentNullException should be thrown");
     }
     else if (actualVal == 0)
     {
         actual.Permutations(actualVal);
         PexAssert.IsTrue(false, "ArgumentOutOfRangeException should be thrown");
     }
     else
     {
         PexObserve.ValueForViewing <int[]>("actual OrderedSet", actual.ToArray());
         PexObserve.ValueForViewing("Result of permutation", actual.Permutations(actualVal));
     }
 }
예제 #3
0
 public void PerumtationsEmptySetPUT(OrderedSet<int> actual, int actualVal)
 {
     if (actual == null)
     {
         actual.Permutations(actualVal);
         PexAssert.IsTrue(false, "ArgumentNullException should be thrown");
     }
     else if (actualVal == 0)
     {
         actual.Permutations(actualVal);
         PexAssert.IsTrue(false, "ArgumentOutOfRangeException should be thrown");
     }
     else
     {
         PexObserve.ValueForViewing<int[]>("actual OrderedSet", actual.ToArray());
         PexObserve.ValueForViewing("Result of permutation",actual.Permutations(actualVal));
     }
 }
예제 #4
0
파일: SetsTest.cs 프로젝트: robertrancz/dsa
        public void PerumtationsEmptySetZeroItems()
        {
            OrderedSet<int> actual = new OrderedSet<int>();

            actual.Permutations(0);
        }
예제 #5
0
파일: SetsTest.cs 프로젝트: robertrancz/dsa
        public void PermutationTest()
        {
            OrderedSet<int> actual = new OrderedSet<int> { 10, 12, 45, 1 };

            Assert.AreEqual(12, actual.Permutations(2));
        }
예제 #6
0
파일: SetsTest.cs 프로젝트: robertrancz/dsa
        public void PermutationsEmptySetTest()
        {
            OrderedSet<int> actual = new OrderedSet<int>();

            Assert.AreEqual(0, actual.Permutations(2));
        }
예제 #7
0
        public void PerumtationsEmptySetZeroItems()
        {
            OrderedSet <int> actual = new OrderedSet <int>();

            actual.Permutations(0);
        }
예제 #8
0
        public void PermutationsEmptySetTest()
        {
            OrderedSet <int> actual = new OrderedSet <int>();

            Assert.AreEqual(0, actual.Permutations(2));
        }