示例#1
0
        public void Fill2DArrayRandomTestCreate()
        {
            MapForLifeGame a = new MapForLifeGame();

            int[,] c = a.CreateAndFill2DMapWithRandom(5, 10);
            int[,] b = new int[5, 5];
            Assert.AreEqual(c.Length, b.Length);
        }
示例#2
0
        public void Fill2DArrayRandomTestFill()
        {
            MapForLifeGame a = new MapForLifeGame();

            int[,] d = a.CreateAndFill2DMapWithRandom(5, 10);
            int counter = 0;

            foreach (int element in d)
            {
                if (element == 1)
                {
                    counter++;
                }
            }
            Assert.IsTrue(counter <= 10);
        }