public void TearDown()
 {
     removeGame(gameSpectate.gameId);
     removeGame(gameCantSpectate.gameId);
     db.deleteUser(db.getUserByName("Hadas").id);
     db.deleteUser(db.getUserByName("Gil").id);
 }
Esempio n. 2
0
 public void Cleanup()
 {
     for (int i = 0; i < 4; i++)
     {
         db.deleteUser(db.getUserByName("test" + i).id);
     }
     center.shutDown();
 }
Esempio n. 3
0
        public void removeUserInDB()
        {
            for (int i = 0; i < 4; i++)
            {
                Assert.IsTrue(db.RegisterUser("test" + i, "" + i, "email" + i, null));
            }

            Assert.IsTrue(db.EditUserById(db.getUserByName("test0").id, null, null, null, null, 1000, 10, false));
            Assert.IsTrue(db.EditUserById(db.getUserByName("test1").id, null, null, null, null, 0, 15, false));
            Assert.IsTrue(db.EditUserById(db.getUserByName("test2").id, null, null, null, null, 700, 20, false));
            Assert.IsTrue(db.EditUserById(db.getUserByName("test3").id, null, null, null, null, 1500, 25, false));

            for (int i = 0; i < 4; i++)
            {
                Assert.IsTrue(db.deleteUser(db.getUserByName("test" + i).id));
            }

            for (int i = 0; i < 4; i++)
            {
                Assert.IsTrue(db.RegisterUser("test" + i, "" + i, "email" + i, null));
            }
        }