BetterCms.Test.Module.ControllerTestBase.GetMockedCommandContext C# (CSharp) Метод

GetMockedCommandContext() защищенный Метод

protected GetMockedCommandContext ( IMessagesIndicator messagesIndicator = null ) : ICommandContext
messagesIndicator IMessagesIndicator
Результат ICommandContext
        protected ICommandContext GetMockedCommandContext(IMessagesIndicator messagesIndicator = null)
        {
            var commandContext = new Mock<ICommandContext>();
            commandContext.Setup(f => f.Messages).Returns(() => messagesIndicator ?? GetMockedMessagesIndicator());
            return commandContext.Object;
        }