コード例 #1
0
        /// <inheritdoc />
        public IBaseTestBuilderWithViewComponent Attributes(Action<IViewComponentAttributesTestBuilder> attributesTestBuilder)
        {
            var newAttributesTestBuilder = new ViewComponentAttributesTestBuilder(this.TestContext);
            attributesTestBuilder(newAttributesTestBuilder);

            AttributesValidator.ValidateAttributes(
                this.ViewComponentAttributes,
                newAttributesTestBuilder,
                this.ThrowNewAttributeAssertionException);

            return this;
        }
コード例 #2
0
        /// <inheritdoc />
        public IBaseTestBuilderWithViewComponent Attributes(Action <IViewComponentAttributesTestBuilder> attributesTestBuilder)
        {
            var newAttributesTestBuilder = new ViewComponentAttributesTestBuilder(this.TestContext);

            attributesTestBuilder(newAttributesTestBuilder);

            AttributesValidator.ValidateAttributes(
                this.ViewComponentAttributes,
                newAttributesTestBuilder,
                this.ThrowNewAttributeAssertionException);

            return(this);
        }
コード例 #3
0
        /// <inheritdoc />
        public IAndViewComponentResultTestBuilder <TInvocationResult> Attributes(
            Action <IViewComponentAttributesTestBuilder> attributesTestBuilder)
        {
            var newAttributesTestBuilder = new ViewComponentAttributesTestBuilder(this.TestContext);

            attributesTestBuilder(newAttributesTestBuilder);

            AttributesValidator.ValidateAttributes(
                this.TestContext.ComponentAttributes,
                newAttributesTestBuilder,
                this.ThrowNewAttributeAssertionException);

            return(this.Builder);
        }