Exemplo n.º 1
0
        public void AddSchemaFromFile_BuilderIsNull_ArgumentNullException()
        {
            // arrange
            // act
            Action action = () =>
                            StitchingBuilderExtensions
                            .AddSchemaFromFile(null, "foo", "bar");

            // assert
            Assert.Equal("builder",
                         Assert.Throws <ArgumentNullException>(action).ParamName);
        }
Exemplo n.º 2
0
        public void AddSchemaFromFile_NameIsEmpty_ArgumentNullException()
        {
            // arrange
            var builder = new MockStitchingBuilder();

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

            // assert
            Assert.Equal("name",
                         Assert.Throws <ArgumentException>(action).ParamName);
        }
Exemplo n.º 3
0
        public void AddSchemaFromFile_SchemaIsNull_ArgumentNullException(
            string filePath)
        {
            // arrange
            var builder = new MockStitchingBuilder();

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

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