public ForumGenerator(string superUserName, string superUserPass) { this.db = new ForumGeneratorContext("ForumGenerator_DB10"); this.superUser = new SuperUser(superUserName, superUserPass); this.forums = new List<Forum>(); this.logger = new Logger(); this.db.Database.ExecuteSqlCommand("UPDATE Users SET isLoggedIn = 0 WHERE 1=1"); this.db.SaveChanges(); this.cp = new ContentPolicy(); this.stopWords = TextClassifier.getStopWords("DefaultStopWords.txt"); }
public ForumGenerator(string superUserName, string superUserPass, bool test) { this.db = new ForumGeneratorContext("ForumGenerator_DB10_TEST"); this.superUser = new SuperUser(superUserName, superUserPass); this.forums = new List<Forum>(); this.logger = new Logger(); this.db.Database.ExecuteSqlCommand("DELETE FROM Comments"); this.db.Database.ExecuteSqlCommand("DELETE FROM Discussions"); this.db.Database.ExecuteSqlCommand("DELETE FROM Moderators"); this.db.Database.ExecuteSqlCommand("DELETE FROM Words"); this.db.Database.ExecuteSqlCommand("DELETE FROM SubForums"); this.db.Database.ExecuteSqlCommand("DELETE FROM Fora"); this.db.Database.ExecuteSqlCommand("DELETE FROM Users"); this.db.Database.ExecuteSqlCommand("DELETE FROM UserFriends"); this.cp = new ContentPolicy(); this.stopWords = TextClassifier.getStopWords("DefaultStopWords.txt"); }