public int CreateForum(int userRequesterId, string name, int numOfModerators, string degreeOfEnsuring, bool uppercase, bool lowercase, bool numbers, bool symbols, int minLength) { int forumId = FM.CreateForum(userRequesterId, name); SetPolicy(userRequesterId, forumId, numOfModerators, degreeOfEnsuring, uppercase, lowercase, numbers, symbols, minLength); return(forumId); }
public void creatingForumReturnsDiffIDTest() { int id1 = fm.CreateForum(titels[0]); int id2 = fm.CreateForum(titels[1]); Assert.AreNotEqual(id1, id2); fm.RemoveForum(id1); fm.RemoveForum(id2); }
public void addThreadTest() { int forumId = fm.CreateForum(titels[0]); int userId = fm.Register(userNames[0], passwords[0], emails[0], forumId); fm.AddAdmin(userId, forumId); int subForumId = fm.CreateSubForum(subTitels[0], forumId, userId); int threadId1 = mm.addThread(forumId, subForumId, userId, topic[0], body[0]); int threadId2 = mm.addThread(forumId, subForumId, userId, topic[1], body[0]); Assert.AreNotEqual(threadId1, threadId2); fm.RemoveForum(forumId); }
public void forumCreationTest() { int id1 = fm.CreateForum(titels[0]); Assert.AreNotEqual(id1, -1); fm.RemoveForum(id1); }
public void AddThreadTest() { int forumId = fm.CreateForum(1, titels[0]); int userId = fm.Register(userNames[0], passwords[0], emails[0], forumId); fm.AddAdmin(1, userId, forumId); int subForumId = fm.CreateSubForum(1, subTitels[0], forumId); int threadId1 = mm.addThread(forumId, subForumId, userId, userNames[0], topic[0], body[0]); int threadId2 = mm.addThread(forumId, subForumId, userId, userNames[0], topic[1], body[0]); Assert.AreEqual(mm.GetTotalMessagesCount(), 2); Assert.AreNotEqual(threadId1, threadId2); fm.UnRegister(userId, forumId); fm.RemoveForum(1, forumId); }