本文整理汇总了C#中Trade.ShouldBeTheSameAs方法的典型用法代码示例。如果您正苦于以下问题:C# Trade.ShouldBeTheSameAs方法的具体用法?C# Trade.ShouldBeTheSameAs怎么用?C# Trade.ShouldBeTheSameAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trade
的用法示例。
在下文中一共展示了Trade.ShouldBeTheSameAs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fill_in_argument_by_type_with_ObjectFactory
public void Fill_in_argument_by_type_with_ObjectFactory()
{
ObjectFactory.Initialize(x => { x.For<IView>().Use<View>(); });
var theNode = new SpecialNode();
var theTrade = new Trade();
var command = ObjectFactory.Container
.With(typeof (Node), theNode)
.With(theTrade)
.GetInstance<Command>();
command.View.ShouldBeOfType<View>();
theNode.ShouldBeTheSameAs(command.Node);
theTrade.ShouldBeTheSameAs(command.Trade);
}
示例2: Pass_in_arguments_as_dictionary
public void Pass_in_arguments_as_dictionary()
{
var container = new Container(x => { x.For<IView>().Use<View>(); });
var theNode = new Node();
var theTrade = new Trade();
var args = new ExplicitArguments();
args.Set(theNode);
args.SetArg("trade", theTrade);
var command = container.GetInstance<Command>(args);
command.View.ShouldBeOfType<View>();
theNode.ShouldBeTheSameAs(command.Node);
theTrade.ShouldBeTheSameAs(command.Trade);
}
示例3: Fill_in_argument_by_type
public void Fill_in_argument_by_type()
{
var container = new Container(x => { x.For<IView>().Use<View>(); });
var theNode = new SpecialNode();
var theTrade = new Trade();
var command = container
.With(typeof (Node), theNode)
.With(theTrade)
.GetInstance<Command>();
command.View.ShouldBeOfType<View>();
theNode.ShouldBeTheSameAs(command.Node);
theTrade.ShouldBeTheSameAs(command.Trade);
}