示例#1
0
        public void AddSchema_2_BuilderIsNull_ArgumentNullException()
        {
            // arrange
            ISchema customerSchema = CustomerSchemaFactory.Create();

            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchema(null, "foo", customerSchema);

            // assert
            Assert.Equal("builder",
                         Assert.Throws <ArgumentNullException>(action).ParamName);
        }
示例#2
0
        public void AddSchema_2_SchemaNameIsEmpty_ArgumentNullException()
        {
            // arrange
            ISchema customerSchema = CustomerSchemaFactory.Create();
            var     builder        = new MockStitchingBuilder();

            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchema(builder, new NameString(), customerSchema);

            // assert
            Assert.Equal("name",
                         Assert.Throws <ArgumentException>(action).ParamName);
        }
示例#3
0
        public void AddSchema_2_SchemaIsNull_ArgumentNullException()
        {
            // arrange
            ISchema customerSchema = CustomerSchemaFactory.Create();
            var     builder        = new MockStitchingBuilder();

            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchema(builder, "foo", null);

            // assert
            Assert.Equal("schema",
                         Assert.Throws <ArgumentNullException>(action).ParamName);
        }