private void SetUp() { f = new Forum("forum test"); f.ChangePolicy(new DefaultPolicy()); f.Register("yaniv", "aaa", "*****@*****.**", "yanivra"); m = f.login("yaniv", "aaa"); f.AddNewSubForum("blabla", m); }
public void TestAddNewSubForum() { f.Register("yaniv", "aaa", "*****@*****.**", "yanivra"); Member tempm = new Member("yaniv", "aaa", "*****@*****.**", "yanivra", f, "Dsfsdf"); Assert.IsFalse(f.AddNewSubForum("blabla", tempm)); Member m = f.login("yaniv", "aaa"); List <SubForum> list = f.getSubForum(); Assert.AreEqual(0, list.Count); //Assert.AreNotEqual(-1,f.Register("yaniv", "aaa", "*****@*****.**", "yanivra")); //Assert.IsNotNull (m = f.login("yaniv", "aaa")); f.AddNewSubForum("blabla", m); list = f.getSubForum(); Assert.AreEqual(1, list.Count); Assert.AreEqual("blabla", list[0].Name); }
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); }