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 creatingSubForumReturnsDiffIDTest() { int id1 = fm.CreateForum(1, titels[0]); int id2 = fm.CreateSubForum(1, subTitels[1], id1); int id3 = fm.CreateSubForum(1, subTitels[0], id1); Assert.AreNotEqual(id1, id2); fm.RemoveForum(1, id1); fm.RemoveSubForum(1, id1, id2); fm.RemoveSubForum(1, id1, id3); }
public void subForumCreationTest() { int id1 = fm.CreateForum(titels[0]); int userId = fm.Register(userNames[0], passwords[0], emails[0], id1); fm.AddAdmin(userId, id1); Assert.AreNotEqual(-1, fm.CreateSubForum(subTitels[0], id1, userId)); fm.RemoveForum(id1); }
public void creatingSubForumReturnsDiffIDTest() { int id1 = fm.CreateForum(titels[0]); int userId = fm.Register(user[0], user[1], user[2], id1); fm.AddAdmin(userId, id1); int id2 = fm.CreateSubForum(subTitels[1], id1, userId); int id3 = fm.CreateSubForum(subTitels[0], id1, userId); Assert.AreNotEqual(id1, id2); fm.RemoveForum(id1); }
public int CreateSubForum(int userRequesterId, int forumId, string topic) { int subForumId = FM.CreateSubForum(userRequesterId, topic, forumId); return(subForumId); }
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); }