public void UnitTestSubForumEditPostFail() { SubForum sf = SubForum.create("forum", "subforum"); User u = User.create("user", "password", "*****@*****.**", "q", "a"); Assert.IsTrue(!sf.editPost(1, "superAdmin", permission.SUPER_ADMIN, "new content").Equals("true")); sf.writePost(0, u, "title1", "content1"); Assert.IsTrue(!sf.editPost(2, "superAdmin", permission.SUPER_ADMIN, "new content").Equals("true")); sf.writePost(1, u, "title2", "content2"); sf.deletePost(2, postDeletionPermission.MODERATOR, permission.SUPER_ADMIN, "superAdmin"); Assert.IsTrue(!sf.editPost(2, "superAdmin", permission.SUPER_ADMIN, "new content").Equals("true")); sf.deletePost(1, postDeletionPermission.MODERATOR, permission.SUPER_ADMIN, "superAdmin"); Assert.IsTrue(!sf.editPost(1, "superAdmin", permission.SUPER_ADMIN, "new content").Equals("true")); }