Example #1
0
        public void ConvertToArrayLocationTestHigh()
        {
            TicTac t = new TicTac();

            int[] expected = new int[] { 2, 2 };

            int[] actual = t.ConvertToArrayLocation("9");

            CollectionAssert.AreEqual(expected, actual);
        }
Example #2
0
        public void ConvertToArrayLocationTestOutOfBounds()
        {
            //What should happen when the user enters an invalid number (out of bounds of the map)?
            TicTac t = new TicTac();

            int[] expected = new int[] { 2, 2 };

            int[] actual = t.ConvertToArrayLocation("15");

            CollectionAssert.AreEqual(expected, actual);
        }
Example #3
0
        public void ConvertToArrayLocationTestNonInt()
        {
            //This test is here to show you invalid input is not handled
            TicTac t = new TicTac();

            int[] expected = new int[] { 2, 2 };

            int[] actual = t.ConvertToArrayLocation("a");

            CollectionAssert.AreEqual(expected, actual);
        }