public virtual void TestPermutation()
 {
     object[][] data =
     {
         new object[] {"A", "B"}, new object[]
         {
             "X",
             "Y", "Z"
         }
     };
     var config = new PermutingTestConfig(data);
     object[][] expected =
     {
         new object[] {"A", "X"}, new object[]
         {
             "A", "Y"
         },
         new object[] {"A", "Z"}, new object[] {"B", "X"}, new object[]
         {
             "B", "Y"
         },
         new object[] {"B", "Z"}
     };
     for (var groupIdx = 0; groupIdx < expected.Length; groupIdx++)
     {
         Assert.IsTrue(config.MoveNext());
         object[] current = {config.Current(0), config.Current(1)};
         ArrayAssert.AreEqual(expected[groupIdx], current);
     }
     Assert.IsFalse(config.MoveNext());
 }
Example #2
0
        public virtual void TestPermutation()
        {
            object[][] data =
            {
                new object[] { "A", "B" }, new object[]
                {
                    "X",
                    "Y", "Z"
                }
            };
            var config = new PermutingTestConfig(data);

            object[][] expected =
            {
                new object[] { "A", "X" }, new object[]
                {
                    "A", "Y"
                },
                new object[] { "A", "Z" }, new object[] { "B", "X" }, new object[]
                {
                    "B", "Y"
                },
                new object[] { "B", "Z" }
            };
            for (var groupIdx = 0; groupIdx < expected.Length; groupIdx++)
            {
                Assert.IsTrue(config.MoveNext());
                object[] current = { config.Current(0), config.Current(1) };
                ArrayAssert.AreEqual(expected[groupIdx], current);
            }
            Assert.IsFalse(config.MoveNext());
        }