本文整理汇总了C#中Ploeh.AutoFixture.Idioms.GuardClauseAssertion.Verify方法的典型用法代码示例。如果您正苦于以下问题:C# GuardClauseAssertion.Verify方法的具体用法?C# GuardClauseAssertion.Verify怎么用?C# GuardClauseAssertion.Verify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ploeh.AutoFixture.Idioms.GuardClauseAssertion
的用法示例。
在下文中一共展示了GuardClauseAssertion.Verify方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VerifyBoundariesForProperty
public void VerifyBoundariesForProperty()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var property = typeof(GuardedPropertyHolder<object>).GetProperty("Property");
assertion.Verify(property);
}
示例2: VerifyBoundariesForAllPropertiesOnMutableClass
public void VerifyBoundariesForAllPropertiesOnMutableClass()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var properties = typeof(GuardedPropertyHolder<Version>).GetProperties();
assertion.Verify(properties);
}
示例3: VerifyBoundariesForMethod
public void VerifyBoundariesForMethod()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var method = typeof(GuardedMethodHost).GetMethod("ConsumeStringAndInt32AndGuid");
assertion.Verify(method);
}
示例4: VerifyBoundariesForAllMethods
public void VerifyBoundariesForAllMethods()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var methods = typeof(GuardedMethodHost).GetMethods();
assertion.Verify(methods);
}
示例5: VerifyBoundariesForAllPropertiesOnImmutableClass
public void VerifyBoundariesForAllPropertiesOnImmutableClass()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var properties = typeof(DoubleParameterType<string, object>).GetProperties();
assertion.Verify(properties);
}
示例6: Methods_Should_Throw_When_Any_Args_Are_Null
public void Methods_Should_Throw_When_Any_Args_Are_Null(GuardClauseAssertion assertion)
{
var methods =
typeof (AdvProcessSettingsExtensions).GetMethods(BindingFlags.Static |
BindingFlags.Public).Where(m=>m.Name!="WithEnvironmentVariable");
assertion.Verify(methods);
}
示例7: VerifyBoundariesForAllMembers
public void VerifyBoundariesForAllMembers()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var members = typeof(GuardedConstructorHost<Version>).GetMembers();
assertion.Verify(members);
}
示例8: VerifyBoundariesForTypeWithRefMethod
public void VerifyBoundariesForTypeWithRefMethod()
{
var fixture = new Fixture();
var assertion = new GuardClauseAssertion(fixture);
var type = typeof(TypeWithRefMethod<Version>);
assertion.Verify(type);
}
示例9: NullForCtorArgumentsThrowsException
public void NullForCtorArgumentsThrowsException(IFixture fixture, Name name)
{
fixture.Inject<IParameter>(new ParameterTest());
fixture.Inject<ParameterMeta>(ParameterMeta.Create<IParameter>(name));
var assertion = new GuardClauseAssertion(fixture);
assertion.Verify(typeof(CmdApplicationConfiguration).GetConstructors());
}
示例10: Sut_ProcessCommand_VerifyGuardClauses
public void Sut_ProcessCommand_VerifyGuardClauses(
GuardClauseAssertion assertion,
IAsyncCommand command)
{
var method = new Methods<ConcurrencyExecutionAsyncCommandBus>()
.Select(sut => sut.ProcessCommand(command));
assertion.Verify(method);
}
示例11: ShouldGuardMethodParameters
public void ShouldGuardMethodParameters()
{
var fixture = new Fixture().Customize(new MediaDomainCustomization());
var guardMethodParametersAssertion = new GuardClauseAssertion(fixture);
guardMethodParametersAssertion.Verify(DomainTypes());
}
示例12: For_HasNullGuards
public void For_HasNullGuards(GuardClauseAssertion assertion, IFixture fixture)
{
// Arrange
fixture.MakeNonRecursive();
// Act
// Assert
assertion.Verify(typeof(DefaultGetNodeString).GetMethod("For"));
}
示例13: ShouldGuardCheckArguments
public void ShouldGuardCheckArguments(
[Frozen]Fixture fixture,
GuardClauseAssertion guardClauseAssertion)
{
fixture.Inject(typeof(EqualsSymmetricAssertion).GetMethod("Equals", BindingFlags.Public));
guardClauseAssertion.Verify(typeof(EqualsSymmetricAssertion).GetMethod("Verify",
new[] { typeof(MethodInfo) }));
}
示例14: HasGuardedConstructor
public void HasGuardedConstructor(Fixture fixture)
{
// -- Arrange
// -- Act
// -- Assert
var assertion = new GuardClauseAssertion(fixture);
assertion.Verify(typeof(CalculatorService).GetConstructors());
}
示例15: HasGuardedConstructor
public void HasGuardedConstructor(Fixture fixture)
{
// -- Arrange
// -- Act
// -- Assert
var assertion = new GuardClauseAssertion(fixture);
assertion.Verify(typeof (CruncherAutomator).GetConstructors());
}