当前位置: 首页>>代码示例>>C#>>正文


C# GuardClauseAssertion.Verify方法代码示例

本文整理汇总了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);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例2: VerifyBoundariesForAllPropertiesOnMutableClass

 public void VerifyBoundariesForAllPropertiesOnMutableClass()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var properties = typeof(GuardedPropertyHolder<Version>).GetProperties();
     assertion.Verify(properties);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例3: VerifyBoundariesForMethod

 public void VerifyBoundariesForMethod()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var method = typeof(GuardedMethodHost).GetMethod("ConsumeStringAndInt32AndGuid");
     assertion.Verify(method);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例4: VerifyBoundariesForAllMethods

 public void VerifyBoundariesForAllMethods()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var methods = typeof(GuardedMethodHost).GetMethods();
     assertion.Verify(methods);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例5: VerifyBoundariesForAllPropertiesOnImmutableClass

 public void VerifyBoundariesForAllPropertiesOnImmutableClass()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var properties = typeof(DoubleParameterType<string, object>).GetProperties();
     assertion.Verify(properties);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例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);
 }
开发者ID:jrnail23,项目名称:Cake.Process,代码行数:7,代码来源:AdvProcessSettingsTests.cs

示例7: VerifyBoundariesForAllMembers

 public void VerifyBoundariesForAllMembers()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var members = typeof(GuardedConstructorHost<Version>).GetMembers();
     assertion.Verify(members);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例8: VerifyBoundariesForTypeWithRefMethod

 public void VerifyBoundariesForTypeWithRefMethod()
 {
     var fixture = new Fixture();
     var assertion = new GuardClauseAssertion(fixture);
     var type = typeof(TypeWithRefMethod<Version>);
     assertion.Verify(type);
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:7,代码来源:Scenario.cs

示例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());
 }
开发者ID:rahulpnath,项目名称:clal,代码行数:7,代码来源:CmdApplicationConfigurationTest.cs

示例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);
		}
开发者ID:Galad,项目名称:Hanno,代码行数:8,代码来源:ConcurrencyExecutionAsyncCommandBusTests.cs

示例11: ShouldGuardMethodParameters

        public void ShouldGuardMethodParameters()
        {
            var fixture = new Fixture().Customize(new MediaDomainCustomization());

            var guardMethodParametersAssertion = new GuardClauseAssertion(fixture);

            guardMethodParametersAssertion.Verify(DomainTypes());
        }
开发者ID:Martin-Bohring,项目名称:fixieSpec,代码行数:8,代码来源:AllDomainTypesTests.cs

示例12: For_HasNullGuards

        public void For_HasNullGuards(GuardClauseAssertion assertion, IFixture fixture)
        {
            // Arrange
            fixture.MakeNonRecursive();

            // Act
            // Assert
            assertion.Verify(typeof(DefaultGetNodeString).GetMethod("For"));
        }
开发者ID:TeaDrivenDev,项目名称:Graphology,代码行数:9,代码来源:DefaultGetNodeStringTests.cs

示例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) }));
            }
开发者ID:baks,项目名称:EqualityTests,代码行数:9,代码来源:EqualsSymmetricAssertionTests.cs

示例14: HasGuardedConstructor

        public void HasGuardedConstructor(Fixture fixture)
        {
            // -- Arrange

            // -- Act

            // -- Assert
            var assertion = new GuardClauseAssertion(fixture);
            assertion.Verify(typeof(CalculatorService).GetConstructors());
        }
开发者ID:nohwnd,项目名称:Calculator,代码行数:10,代码来源:CalculatorServiceTests.cs

示例15: HasGuardedConstructor

        public void HasGuardedConstructor(Fixture fixture)
        {
            // -- Arrange

            // -- Act

            // -- Assert
            var assertion = new GuardClauseAssertion(fixture);
            assertion.Verify(typeof (CruncherAutomator).GetConstructors());
        }
开发者ID:nohwnd,项目名称:Calculator,代码行数:10,代码来源:CruncherAutomatorTests.cs


注:本文中的Ploeh.AutoFixture.Idioms.GuardClauseAssertion.Verify方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。