public RemoveModerator ( string subforum, string moderatorName ) : bool | ||
subforum | string | |
moderatorName | string | |
return | bool |
public void RemoveModeratorsServerTests() { DataManager target = new DataManager(); target.CleanForumData(); User user = new User("user", "user"); target.AddUser(user); target.AddSubforum(new Subforum("subforumName")); List<string> actual; List<string> moderators = new List<string>(); moderators.Add("user"); target.SetModerators("subforumName", moderators); actual = target.GetModerators("subforumName"); Assert.AreEqual(moderators.Count, actual.Count); Assert.AreEqual(moderators[0], actual[0]); Assert.IsTrue(target.RemoveModerator("subforumName", "user")); actual = target.GetModerators("subforumName"); Assert.IsTrue(actual.Count == 0); target.RemoveSubforum("subforumName"); }