예제 #1
0
        public void AddSchemaFromString_BuilderIsNull_ArgumentNullException()
        {
            // arrange
            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchemaFromString(null, "foo", "bar");

            // assert
            Assert.Equal("builder",
                         Assert.Throws <ArgumentNullException>(action).ParamName);
        }
예제 #2
0
        public void AddSchemaFromString_NameIsEmpty_ArgumentNullException()
        {
            // arrange
            var builder = new MockStitchingBuilder();

            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchemaFromString(builder, new NameString(), "bar");

            // assert
            Assert.Equal("name",
                         Assert.Throws <ArgumentException>(action).ParamName);
        }
예제 #3
0
        public void AddSchemaFromString_SchemaIsNull_ArgumentNullException(
            string filePath)
        {
            // arrange
            var builder = new MockStitchingBuilder();

            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchemaFromString(builder, new NameString(), filePath);

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