BetterCms.Test.Module.ControllerTestBase.GetMockedCommandContext C# (CSharp) Méthode

GetMockedCommandContext() protected méthode

protected GetMockedCommandContext ( IMessagesIndicator messagesIndicator = null ) : ICommandContext
messagesIndicator IMessagesIndicator
Résultat ICommandContext
        protected ICommandContext GetMockedCommandContext(IMessagesIndicator messagesIndicator = null)
        {
            var commandContext = new Mock<ICommandContext>();
            commandContext.Setup(f => f.Messages).Returns(() => messagesIndicator ?? GetMockedMessagesIndicator());
            return commandContext.Object;
        }