Ejemplo n.º 1
0
        public void TestMethod1()
        {
            Solution s      = new Solution();
            var      result = s.WordBreak("catsanddog", new string[] { "cat", "cats", "and", "sand", "dog" });

            Assert.IsTrue(enumerableComparer.Equivalent(result.ToArray(), new string[] { "cats and dog", "cat sand dog" }));
        }
Ejemplo n.º 2
0
        public void TestMethod1()
        {
            Solution s      = new Solution();
            var      result = s.QueensAttacktheKing(new int[][] { new int[] { 0, 1 }, new int[] { 1, 0 }, new int[] { 4, 0 }, new int[] { 0, 4 }, new int[] { 3, 3 }, new int[] { 2, 4 } }, new int[] { 0, 0 });

            Assert.IsTrue(enumerableComparer.Equivalent(result.Select(e => e.ToArray()).ToArray(), new int[][] { new int[] { 0, 1 }, new int[] { 1, 0 }, new int[] { 3, 3 } }));
        }