public void ProcessMessageAllowsAnonymousCommandsForUncachedUsers() { var result = CommandManager.ProcessMessage("Unrestricted", "Uncached"); Assert.IsTrue(result.Processed); Assert.IsTrue(result.Responses.Any()); AnonymousExecutorMock.Verify(x => x(It.IsAny <string>()), Times.Once()); }
public void ProcessMessageDoesNotAllowRestrictedAnonymousCommandsForUncachedUsers() { UserRoles[0].AddCommand("CommandMock.Unrestricted"); var result = CommandManager.ProcessMessage("Unrestricted", "Uncached"); Assert.IsTrue(result.Processed); Assert.IsTrue(result.Responses.Any()); AnonymousExecutorMock.Verify(x => x(It.IsAny <string>()), Times.Never()); }