• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ISpecimenBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: WritablePropertyAssertion

        /// <summary>
        /// Initializes a new instance of the <see cref="WritablePropertyAssertion"/> class.
        /// </summary>
        /// <param name="builder">
        /// A composer which can create instances required to implement the idiomatic unit test,
        /// such as the owner of the property, as well as the value to be assigned and read from
        /// the property.
        /// </param>
        /// <remarks>
        /// <para>
        /// <paramref name="builder" /> will typically be a <see cref="Fixture" /> instance.
        /// </para>
        /// </remarks>
        public WritablePropertyAssertion(ISpecimenBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

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


示例17: Transform

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

            return new RecursionGuard(builder, new ThrowingRecursionHandler());
        }
开发者ID:RyanLiu99,项目名称:AutoFixture,代码行数:17,代码来源:ThrowingRecursionBehavior.cs


示例18: GetHashCodeSuccessiveAssertion

        /// <summary>
        /// Initializes a new instance of the <see cref="GetHashCodeSuccessiveAssertion"/> class.
        /// </summary>
        /// <param name="builder">
        /// A composer which can create instances required to implement the idiomatic unit test,
        /// such as the owner of the property, as well as the value to be assigned and read from
        /// the member.
        /// </param>
        /// <remarks>
        /// <para>
        /// <paramref name="builder" /> will typically be a <see cref="Fixture" /> instance.
        /// </para>
        /// </remarks>
        public GetHashCodeSuccessiveAssertion(ISpecimenBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

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


示例19: EqualityWithSelfAssertion

        /// <summary>
        /// Initializes a new instance of the <see cref="EqualityWithSelfAssertion"/> class.
        /// </summary>
        /// <param name="builder">
        /// A composer which can create instances required to implement the idiomatic unit test,
        /// such as the owner of the method.
        /// </param>
        /// <remarks>
        /// <para>
        /// <paramref name="builder" /> will typically be a <see cref="Fixture" /> instance.
        /// </para>
        /// </remarks>
        public EqualityWithSelfAssertion(ISpecimenBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

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


示例20: RhinoMockAroundAdvice

        /// <summary>
        /// Initializes a new instance of the <see cref="RhinoMockAroundAdvice"/> class with an
        /// <see cref="ISpecimenBuilder" /> to decorate.
        /// </summary>
        /// <param name="builder">The builder which must build mock instances.</param>
        /// <remarks>
        /// <para>
        /// <paramref name="builder" /> is subsequently available through the <see cref="Builder"/>
        /// property.
        /// </para>
        /// </remarks>
        /// <seealso cref="Builder" />
        public RhinoMockAroundAdvice(ISpecimenBuilder builder)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISpecimenContext类代码示例发布时间:2022-05-24
下一篇:
C# ISpecificationBuilder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap