public void AddCommandTest() { var chatboxManager = new ChatboxManager(); var command = new HelpCommand("ChatboxManagerTestsTestCommand", "", chatboxManager); var result = chatboxManager.AddCommand(command); Assert.AreEqual(true, result); result = chatboxManager.AddCommand(command); Assert.AreEqual(false, result); }
public void RemoveCommandTest() { var chatboxManager = new ChatboxManager(); var command = new HelpCommand("ChatboxManagerTestsTestCommand", "", chatboxManager); var result = chatboxManager.AddCommand(command); Assert.AreEqual(true, result); var result2 = chatboxManager.RemoveCommand("ChatboxManagerTestsTestCommand"); var commands = chatboxManager.GetCommandsStrings(); Assert.AreEqual(true, result2); if (commands.Contains("ChatboxManagerTestsTestCommand")) { Assert.Fail(); } }