SetModerators() public method

public SetModerators ( string subforum, List moderatorsList ) : bool
subforum string
moderatorsList List
return bool
Example #1
0
 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");
 }