Пример #1
0
        ///Tested and passed
        public void ClearTest()
        {
            // PrivateObject param0 = null; // TODO: Initialize to an appropriate value
            // Board_Accessor target = new Board_Accessor(param0); // TODO: Initialize to an appropriate value
            int   size   = 2;
            Board target = Board.createInstance(size);

            Symbol[,] expected = new Symbol[size, size];
            Point position = new Point(0, 0);

            target.PutSymbol(Symbol.Oval, position);
            target.Clear();
            Symbol[,] actual = target.SymbolStore;
            Assert.AreEqual(expected.ToString(), actual.ToString());
            // Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
        //Tested and passed
        public void ResizeBoardTest()
        {
            int   size          = 25;
            Board expectedBoard = Board.createInstance(size);
            int   expectedSize  = expectedBoard.BoardSize + 10;

            Symbol[,] expectedSymbol = new Symbol[expectedSize, expectedSize];

            GameManager gv = new GameManager();

            gv.ResizeBoard();
            Board actualBoard = Board.createInstance();
            int   actualSize  = actualBoard.BoardSize;

            Symbol[,] actualSymbol = actualBoard.SymbolStore;
            Assert.AreEqual(expectedSize, actualSize);
            Assert.AreEqual(expectedSymbol.ToString(), actualSymbol.ToString());
        }