Esempio n. 1
0
        public void TestFindNextOccurranceNoNextOccurranceExists()
        {
            int[,] array = new int[5, 5];
            Point?foundLocation = ArrayHelpers.FindNextOccurranceIn2DArray(array, 1, new Point(0, 0));

            Assert.AreEqual(foundLocation == null, true);
        }
Esempio n. 2
0
        public void TestFindNextOccurrance()
        {
            int[,] array = new int[5, 5];
            array[4, 4]  = 1;
            Point?foundLocation = ArrayHelpers.FindNextOccurranceIn2DArray(array, 1, new Point(0, 0));

            Assert.AreEqual(foundLocation?.X == 4 && foundLocation?.Y == 4, true);
        }