public void SetEmptyPathString()
        {
            // arrange
            var options = new HttpGetMiddlewareOptions();

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

            // assert
            Assert.Throws <ArgumentException>(action);
        }
        public void SetPath()
        {
            // arrange
            var options = new HttpGetMiddlewareOptions();

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

            // assert
            Assert.Equal(new PathString("/foo"), options.Path);
        }
        public void UseGraphQLHttpGet_BuilderServicesOptions_ServicesIsNull()
        {
            // arrange
            IAppBuilder builder = Mock.Of <IAppBuilder>();
            var         options = new HttpGetMiddlewareOptions();

            // act
            Action action =
                () => HttpGetApplicationBuilderExtensions
                .UseGraphQLHttpGet(builder, null, options);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
        public void UseGraphQLHttpGet_BuilderServicesOptions_BuilderIsNull()
        {
            // arrange
            IServiceProvider services = new EmptyServiceProvider();
            var options = new HttpGetMiddlewareOptions();

            // act
            Action action =
                () => HttpGetApplicationBuilderExtensions
                .UseGraphQLHttpGet(null, services, options);

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