本文整理汇总了C#中Importer.Run方法的典型用法代码示例。如果您正苦于以下问题:C# Importer.Run方法的具体用法?C# Importer.Run怎么用?C# Importer.Run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Importer
的用法示例。
在下文中一共展示了Importer.Run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ImporterCallsConverterOnce
public void ImporterCallsConverterOnce()
{
var importer = new Importer(_source, _converter, _destination);
importer.Run();
_converter.Received(1).ConvertData(Arg.Any<DataTable>());
}
示例2: DestinationReceivesConvertedData
public void DestinationReceivesConvertedData()
{
DataTable originalData = new DataTable("table1");
DataTable convertedData = new DataTable("table2");
_source.GetData().Returns(originalData);
_converter.ConvertData(originalData).Returns(convertedData);
var importer = new Importer(_source, _converter, _destination);
importer.Run();
Assert.NotEqual(originalData, convertedData);
_destination.Received(1).Receive(convertedData);
}
示例3: RunReturnsFalseIfDestinationReceiveFails
public void RunReturnsFalseIfDestinationReceiveFails()
{
_destination.Receive(Arg.Any<DataTable>()).Returns(false);
var importer = new Importer(_source, _converter, _destination);
bool result = importer.Run();
Assert.True(!result);
}
示例4: RunReturnsTrueIfDestinationReceiveSucceeds
public void RunReturnsTrueIfDestinationReceiveSucceeds()
{
_destination.Receive(Arg.Any<DataTable>()).Returns(true);
var importer = new Importer(_source, _converter, _destination);
bool result = importer.Run();
Assert.True(result);
}
示例5: ImporterCallsSourceForDataOnce
public void ImporterCallsSourceForDataOnce()
{
var importer = new Importer(_source, _converter, _destination);
importer.Run();
_source.Received(1).GetData();
}