Ejemplo n.º 1
0
        public void InsertGameRoomTest()
        {
            GameRoomXML gamexml = new GameRoomXML(gameRoom);

            Database.LinqToSql.GameRoom toIns = new Database.LinqToSql.GameRoom();
            toIns.GameId   = gameRoom.GetGameNum();
            toIns.isActive = gameRoom.IsGameActive();
            toIns.RoomId   = gameRoom.Id;
            toIns.GameXML  = proxy.GameRoomToXElement(gamexml);
            toIns.Replay   = gameRoom.GetGameReplay();
            bool  ans = controller.InsertGameRoom(toIns);
            IGame g   = proxy.GetGameRoombyId(gameRoom.Id);

            Assert.IsTrue(ans);
            Assert.IsNotNull(g);
            proxy.DeleteGameRoomPref(gameRoom.Id);
            proxy.DeleteGameRoom(gameRoom.Id, gameRoom.GetGameNum());
        }