Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void forumCreationTest()
        {
            int id1 = fm.CreateForum(titels[0]);

            Assert.AreNotEqual(id1, -1);
            fm.RemoveForum(id1);
        }
Esempio n. 5
0
        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);
        }