Exemple #1
0
        public void SetPath()
        {
            // arrange
            var options = new HttpGetMiddlewareOptions();

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

            // assert
            Assert.Equal(new PathString("/foo"), options.Path);
        }
Exemple #2
0
        public void SetEmptyPathString()
        {
            // arrange
            var options = new HttpGetMiddlewareOptions();

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

            // assert
            Assert.Throws <ArgumentException>(action);
        }
Exemple #3
0
        public void UseGraphQLHttpGet_BuilderOptions_BuilderIsNull()
        {
            // arrange
            var options = new HttpGetMiddlewareOptions();

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

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