本文整理汇总了C#中IFixture.MakeNonRecursive方法的典型用法代码示例。如果您正苦于以下问题:C# IFixture.MakeNonRecursive方法的具体用法?C# IFixture.MakeNonRecursive怎么用?C# IFixture.MakeNonRecursive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFixture
的用法示例。
在下文中一共展示了IFixture.MakeNonRecursive方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: For_ReturnsCombinationOfDepthAndMemberTypesStrings
public void For_ReturnsCombinationOfDepthAndMemberTypesStrings(
[Frozen] IGetDepthString getDepthString,
[Frozen] IGetMemberTypesString getMemberTypesString,
DefaultGetNodeString sut,
string depthString,
string memberTypesString,
int depth,
IFixture fixture)
{
// Arrange
fixture.MakeNonRecursive();
var graphNode = fixture.Create<GraphNode>();
getDepthString.For(depth).Returns(depthString);
getMemberTypesString.For(graphNode).Returns(memberTypesString);
var expectedResult = depthString + memberTypesString;
// Act
var result = sut.For(graphNode, depth);
// Assert
Assert.Equal(expectedResult, result);
}
示例2: For_HasNullGuards
public void For_HasNullGuards(GuardClauseAssertion assertion, IFixture fixture)
{
// Arrange
fixture.MakeNonRecursive();
// Act
// Assert
assertion.Verify(typeof(DefaultGetNodeString).GetMethod("For"));
}
示例3: SubGraph_NotSet_ReturnsEmptyList
public void SubGraph_NotSet_ReturnsEmptyList(IFixture fixture)
{
// Arrange
fixture.MakeNonRecursive();
fixture.Customize(new NoAutoPropertiesCustomization(typeof(GraphNode)));
var sut = fixture.Create<GraphNode>();
// Act
// Assert
Assert.Empty(sut.SubGraph);
}
示例4: Properties_AreWritable
public void Properties_AreWritable(WritablePropertyAssertion assertion, IFixture fixture)
{
fixture.MakeNonRecursive();
assertion.Verify(typeof(GraphNode));
}