Example #1
0
        public void SetEmptyPathString()
        {
            // arrange
            var options = new HttpGetSchemaMiddlewareOptions();

            // act
            Action action = () => options.Path = default;

            // assert
            Assert.Throws <ArgumentException>(action);
        }
Example #2
0
        public void SetPath()
        {
            // arrange
            var options = new HttpGetSchemaMiddlewareOptions();

            // act
            options.Path = new PathString("/foo");

            // assert
            Assert.Equal(new PathString("/foo"), options.Path);
        }
Example #3
0
        public void UseGraphQLHttpGetSchema_BuilderOptions_BuilderIsNull()
        {
            // arrange
            var options = new HttpGetSchemaMiddlewareOptions();

            // act
            Action action =
                () => HttpGetSchemaApplicationBuilderExtensions
                .UseGraphQLHttpGetSchema(null, options);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }