Пример #1
0
        public void TestAddNewPost()
        {
            SetUp();
            Post Thread = new Post("aaaaa", m);

            m.AddNewThread(f.getSubForum()[0], Thread);
            Post reply = new Post("dsfdsfds", m);

            m.AddNewPost(reply, Thread);
            Assert.IsTrue(m.GetMemberPosts().Count == 2);
            Assert.IsTrue(m.GetMemberPosts()[0] == Thread);
            Assert.IsTrue(m.GetMemberPosts()[1] == reply);
            Assert.IsTrue(Thread.getComments()[0] == reply);
        }
Пример #2
0
 private void SetUp()
 {
     f = new Forum("forum test");
     f.Register("yaniv", "aaa", "*****@*****.**", "yanivra");
     m = f.login("yaniv", "aaa");
     f.AddNewSubForum("Games", m);
     p = new Post("shalom", m);
     p = m.AddNewThread(f.getSubForum()[0], p);
 }