Beispiel #1
0
        public void DeleteGameTableTest()
        {
            // arrange
            gameTableManagement = new GameTableManagement();
            IGameTableDBIF tableDB = new GameTableDB();
            ICGUserDBIF    userDB  = new CGUserDB();
            CGUser         user    = CGUserConverter.convertFromCGUserModelToCGUser(userDB.GetById("Test"));

            gameTableManagement.CreateGameTable(user, "TestTable");
            GameTable table = gameTableManagement.GetGameTableByTableName("TestTable");

            //Act
            gameTableManagement.DeleteGameTable(table.Id);

            //Assert
            Assert.IsNull(tableDB.GetById(table.Id));
        }
Beispiel #2
0
        public void CreateGameTableTest()
        {
            // arrange
            gameTableManagement = new GameTableManagement();
            IGameTableDBIF tableDB = new GameTableDB();
            var            user1   = new CGUser();

            //Act
            var table      = gameTableManagement.CreateGameTable(user1, "GameTable");
            var tableModel = tableDB.GetGameTableByTableName("GameTable");

            //Assert
            Assert.AreEqual(tableModel.TableName, "GameTable");

            //Cleanup
            tableDB.Delete(tableModel);
        }