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


C# ISpecimenBuilder类代码示例

本文整理汇总了C#中ISpecimenBuilder的典型用法代码示例。如果您正苦于以下问题:C# ISpecimenBuilder类的具体用法?C# ISpecimenBuilder怎么用?C# ISpecimenBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ISpecimenBuilder类属于命名空间,在下文中一共展示了ISpecimenBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CustomizationNode

        /// <summary>
        /// Initializes a new instance of the <see cref="CustomizationNode" />
        /// class.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <remarks>
        /// <para>
        /// After initialization <paramref name="builder" /> is available via
        /// the <see cref="Builder" /> property.
        /// </para>
        /// </remarks>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="builder" /> is null.
        /// </exception>
        /// <seealso cref="Builder"/>
        public CustomizationNode(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");

            this.builder = builder;
        }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:22,代码来源:CustomizationNode.cs

示例2: AutoPropertiesTarget

        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="AutoPropertiesTarget" /> class.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <remarks>
        /// <para>
        /// After initialization <paramref name="builder" /> is available via
        /// the <see cref="Builder" /> property.
        /// </para>
        /// </remarks>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="builder" /> is null.
        /// </exception>
        /// <seealso cref="Builder"/>
        public AutoPropertiesTarget(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException(nameof(builder));

            this.builder = builder;
        }
开发者ID:ErikSchierboom,项目名称:AutoFixture,代码行数:22,代码来源:AutoPropertiesTarget.cs

示例3: AutoConfiguredMoqCustomization

        /// <summary>
        /// Creates a new instance of <see cref="AutoConfiguredMoqCustomization"/>.
        /// </summary>
        /// <param name="relay">A mock relay to be added to <see cref="IFixture.ResidueCollectors"/></param>
        public AutoConfiguredMoqCustomization(ISpecimenBuilder relay)
        {
            if (relay == null)
                throw new ArgumentNullException("relay");

            this.relay = relay;
        }
开发者ID:jwChung,项目名称:AutoFixture,代码行数:11,代码来源:AutoConfiguredMoqCustomization.cs

示例4: Transform

        /// <summary>
        /// Decorates the supplied <see cref="ISpecimenBuilder" /> with an
        /// <see cref="RecursionGuard"/>.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <returns>
        /// <paramref name="builder" /> decorated with an
        /// <see cref="RecursionGuard" />.
        /// </returns>
        public ISpecimenBuilder Transform(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException(nameof(builder));

            return new RecursionGuard(builder, new OmitOnRecursionHandler(), recursionDepth);
        }
开发者ID:Tungsten78,项目名称:AutoFixture,代码行数:16,代码来源:OmitOnRecursionBehavior.cs

示例5: AutoNSubstituteCustomization

        /// <summary>Initializes a new instance of the <see cref="AutoNSubstituteCustomization"/> class.</summary>
        /// <param name="builder">The builder to use to create specimens for this customization.</param>
        public AutoNSubstituteCustomization(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");

            this.builder = builder;
        }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:9,代码来源:AutoNSubstituteCustomization.cs

示例6: Transform

        /// <summary>
        /// Decorates the supplied <see cref="ISpecimenBuilder" /> with an
        /// <see cref="OmitOnRecursionGuard"/>.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <returns>
        /// <paramref name="builder" /> decorated with an
        /// <see cref="OmitOnRecursionGuard" />.
        /// </returns>
        public ISpecimenBuilder Transform(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");

            return new OmitOnRecursionGuard(builder);
        }
开发者ID:rajeshgupthar,项目名称:AutoFixture,代码行数:16,代码来源:OmitOnRecursionBehavior.cs

示例7: ResidueCollectorNode

        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="ResidueCollectorNode" /> class.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <remarks>
        /// <para>
        /// After initialization <paramref name="builder" /> is available via
        /// the <see cref="Builder" /> property.
        /// </para>
        /// </remarks>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="builder" /> is null.
        /// </exception>
        /// <seealso cref="Builder" />
        public ResidueCollectorNode(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException(nameof(builder));

            this.Builder = builder;
        }
开发者ID:Tungsten78,项目名称:AutoFixture,代码行数:22,代码来源:ResidueCollectorNode.cs

示例8: ObjectDisposalAssertion

        /// <summary>
        /// Initializes a new instance of the <see cref="ObjectDisposalAssertion" /> class.
        /// </summary>
        /// <param name="builder">
        /// The builder to create an owner object.
        /// </param>
        public ObjectDisposalAssertion(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");

            this.builder = builder;
        }
开发者ID:jwChung,项目名称:Experimentalism,代码行数:13,代码来源:ObjectDisposalAssertion.cs

示例9: BehaviorRoot

        /// <summary>
        /// Initializes a new instance of the <see cref="BehaviorRoot" />
        /// class.
        /// </summary>
        /// <param name="builder">The builder to decorate.</param>
        /// <remarks>
        /// <para>
        /// After initialization <paramref name="builder" /> is available via
        /// the <see cref="Builder" /> property.
        /// </para>
        /// </remarks>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="builder" /> is null.
        /// </exception>
        /// <seealso cref="Builder" />
        public BehaviorRoot(ISpecimenBuilder builder)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");

            this.builder = builder;
        }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:22,代码来源:BehaviorRoot.cs

示例10: EqualityTestCaseProvider

 public EqualityTestCaseProvider(ISpecimenBuilder specimenBuilder)
 {
     if (specimenBuilder == null)
     {
         throw new ArgumentNullException("specimenBuilder");
     }
     this.specimenBuilder = specimenBuilder;
 }
开发者ID:baks,项目名称:EqualityTests,代码行数:8,代码来源:EqualityTestCaseProvider.cs

示例11: EqualsTransitiveAssertion

 public EqualsTransitiveAssertion(ISpecimenBuilder builder)
 {
     if (builder == null)
     {
         throw new ArgumentNullException("builder");
     }
     this.builder = builder;
 }
开发者ID:baks,项目名称:EqualityTests,代码行数:8,代码来源:EqualsTransitiveAssertion.cs

示例12: RecursionGuard

 /// <summary>
 /// Initializes a new instance of the <see cref="RecursionGuard" />
 /// class.
 /// </summary>
 /// <param name="builder">The intercepted builder to decorate.</param>
 /// <param name="recursionHandler">
 /// An <see cref="IRecursionHandler" /> that will handle a recursion
 /// situation, if one is detected.
 /// </param>
 public RecursionGuard(
     ISpecimenBuilder builder,
     IRecursionHandler recursionHandler)
     : this(builder, 
         recursionHandler,
         EqualityComparer<object>.Default)
 {
 }
开发者ID:dhilgarth,项目名称:AutoFixture,代码行数:17,代码来源:RecursionGuard.cs

示例13: ShouldSavePersonWithLinks

 public ShouldSavePersonWithLinks(ISession session, PersonFactory personFactory, ISpecimenBuilder specimenBuilder)
 {
     var links = specimenBuilder.CreateMany<LinkField>(_count).ToList();
     var fake = specimenBuilder.Create<Person>();
     var person = personFactory.CreatePerson(fake.Name, fake.Email, fake.Bio, Location.Georgetown, null, links);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
开发者ID:ChrisMissal,项目名称:atxc,代码行数:8,代码来源:ShouldSavePersonWithLinks.cs

示例14: ShouldSavePersonWithCategories

 public ShouldSavePersonWithCategories(ISession session, PersonFactory personFactory, ISpecimenBuilder specimenBuilder)
 {
     var categories = specimenBuilder.CreateMany<CategoryField>(_count).ToList();
     var fake = specimenBuilder.Create<Person>();
     var person = personFactory.CreatePerson(fake.Name, fake.Email, fake.Bio, Location.SanMarcos, categories);
     session.SaveOrUpdate(person);
     _personId = person.Id;
 }
开发者ID:ChrisMissal,项目名称:atxc,代码行数:8,代码来源:ShouldSavePersonWithCategories.cs

示例15: ShouldSaveApproval

 public ShouldSaveApproval(ISession session, ISpecimenBuilder fixture)
 {
     var person = fixture.Create<Person>();
     session.SaveOrUpdate(person);
     var approval = new Approval { Person = person };
     session.SaveOrUpdate(approval);
     _approvalId = approval.Id;
 }
开发者ID:ChrisMissal,项目名称:atxc,代码行数:8,代码来源:ShouldSaveApproval.cs


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