예제 #1
0
        public void TestGetPexesoBoardColumns()
        {
            //arrange
            PexesoBoard board1 = new PexesoBoard(4, 4);

            //assert
            Assert.AreEqual(4, board1.getPexesoBoardColumns());
        }
예제 #2
0
        public void TestPexesoBoardConstructor()
        {
            //arrange and act
            PexesoBoard board1 = new PexesoBoard(4, 4);
            PexesoBoard board2 = new PexesoBoard(8, 8);

            //assert
            Assert.AreEqual(16, board1.GetPexesoCardsArray().Length);
            Assert.AreEqual(64, board2.GetPexesoCardsArray().Length);
        }
예제 #3
0
        public void TestCleanPexesoBoard()
        {
            //arrange
            PexesoBoard board1 = new PexesoBoard(4, 4);

            //arrange
            board1.AddToPexesoBoard(0, 0);
            board1.AddToPexesoBoard(0, 1);
            board1.CleanPexesoBoard();
            //assert
            Assert.IsNull(board1.GetPexesoCard(0, 0));
            Assert.IsNull(board1.GetPexesoCard(0, 1));
        }
예제 #4
0
        public void TestAddToPexesoBoard()
        {
            //arrange
            PexesoBoard board1 = new PexesoBoard(4, 4);
            PexesoBoard board2 = new PexesoBoard(8, 8);

            //act
            board1.AddToPexesoBoard(0, 0);
            board2.AddToPexesoBoard(7, 7);
            //assert
            board1.GetPexesoCard(0, 0).ToString();
            Assert.IsNotNull(board1.GetPexesoCard(0, 0));
            Assert.IsNotNull(board2.GetPexesoCard(7, 7));
        }
예제 #5
0
 public void TestPexesoBoardConstructorException()
 {
     //arrange and act and throw exception
     _ = new PexesoBoard(3, 3);
 }