本文整理汇总了C#中ILogger.Stub方法的典型用法代码示例。如果您正苦于以下问题:C# ILogger.Stub方法的具体用法?C# ILogger.Stub怎么用?C# ILogger.Stub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILogger
的用法示例。
在下文中一共展示了ILogger.Stub方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Setup
public void Setup()
{
executableProcess = MockRepository.GenerateMock<IExecutableProcess>();
logger = MockRepository.GenerateMock<ILogger>();
logger.Stub(x => x.Log(Arg<string>.Is.Anything));
netshFirewallRuleNameAvailable = new NetshFirewallRuleNameAvailable(executableProcess, logger);
}
开发者ID:rackerlabs,项目名称:openstack-guest-agents-windows-xenserver,代码行数:7,代码来源:NetshFirewallRuleNameAvailableSpec.cs
示例2: Setup
public void Setup()
{
execProcess = MockRepository.GenerateMock<IExecutableProcess>();
logger = MockRepository.GenerateMock<ILogger>();
logger.Stub(x => x.Log(Arg<string>.Is.Anything));
systemInformation = new SystemInformation(execProcess, logger);
input = new String('x', 200) + @"Windows Boot Loader\n\n\n\n"
+ new String('y', 200) + " {my unique identifier} "
+ new string('z', 302);
}
开发者ID:rackerlabs,项目名称:openstack-guest-agents-windows-xenserver-old,代码行数:12,代码来源:SystemInformationSpec.cs
示例3: Setup
public void Setup()
{
logger = MockRepository.GenerateMock<ILogger>();
finalizer = new Finalizer(logger);
logger.Stub(x => x.Log(Arg<string>.Is.Anything));
CreateFile("test.txt");
Directory.CreateDirectory("test_directory");
for (var i = 10; i < 10; i++)
{
CreateFile("test_directory\\test" + i + ".txt");
}
}
示例4: Setup
public void Setup()
{
_agentUpdateInfo = "http://something.com/file.zip,544564abc453de787ad";
_downloader = MockRepository.GenerateMock<IDownloader>();
_checksumValidator = MockRepository.GenerateMock<IChecksumValidator>();
_unzipper = MockRepository.GenerateMock<IUnzipper>();
_installer = MockRepository.GenerateMock<IInstaller>();
_finalizer = MockRepository.GenerateMock<IFinalizer>();
_connectionChecker = MockRepository.GenerateMock<IConnectionChecker>();
_sleeper = MockRepository.GenerateMock<ISleeper>();
_logger = MockRepository.GenerateMock<ILogger>();
_serviceRestarter = MockRepository.GenerateMock<IServiceRestarter>();
_agentUpdateMessageHandler = new AgentUpdateMessageHandler();
_logger.Stub(x => x.Log(Arg<string>.Is.Anything));
_xentoolsUpdate = new XentoolsUpdate(_sleeper, _downloader, _checksumValidator, _unzipper, _installer, _finalizer, _serviceRestarter, _connectionChecker, _agentUpdateMessageHandler, _logger);
}
开发者ID:rackerlabs,项目名称:openstack-guest-agents-windows-xenserver-old,代码行数:19,代码来源:XentoolsUpdateSpec.cs
示例5: Establish_context
protected override void Establish_context()
{
base.Establish_context();
_logger = MockRepository.GenerateStub<ILogger>();
_dataSource =
MockRepository.GenerateStub<IDataSource>();
_businessService =
new DIBusinessService(_logger, _dataSource);
_logger.Stub(logger => logger.Log());
_dataSource
.Stub(dataSource => dataSource.GetData(44))
.Return("from mock");
_dataSource
.Stub(dataSource => dataSource.GetData(1))
.IgnoreArguments().Return("_not_ from mock");
}