Exemplo n.º 1
0
        public void Test_PermutateV4_Partitionize_2()
        {
            var input = new[]
            {
                new Slot {
                    Code = "abc", Type = "L", Number = "1"
                },
                new Slot {
                    Code = "abc", Type = "T", Number = "1"
                }
            };
            var actual   = Permutator.Partitionize(input);
            var expected = new List <List <Slot> >
            {
                new List <Slot> {
                    input[0]
                },
                new List <Slot> {
                    input[1]
                }
            };

            if (actual.Count != expected.Count)
            {
                Assert.Fail();
            }
            foreach (var e in expected)
            {
                actual.RemoveAll(x => x.ScrambledEquals(e));
            }
            Assert.True(actual.Count == 0);
        }