public void GivenBadPatternWhenMapPowerToolsEFCoreBasedCalledThenShouldThrowArgument(
            string pattern)
        {
            IEndpointRouteBuilder builder = null;

            CreateSimpleServer(config => builder = config);
            Assert.Throws <ArgumentException>(
                () => MiddlewareExtensions.MapPowerToolsEFCore(
                    builder,
                    RoutePatternFactory.Parse(pattern),
                    defaultTypes));
        }
        public void GivenBadDbContextTypesWhenMapPowerToolsEFCoreBaseCalledThenShouldThrowArgument(
            Type[] dbContextTypes)
        {
            IEndpointRouteBuilder builder = null;

            CreateSimpleServer(config => builder = config);

            Assert.Throws <ArgumentException>(
                () => MiddlewareExtensions.MapPowerToolsEFCore(
                    builder,
                    routePattern,
                    dbContextTypes));
        }
        public void GivenNullInputsWhenMapPowerToolsEFCoreBaseCalledThenShouldThrowArgumentNull(
            bool useEndPointRouteBuilder,
            RoutePattern pattern,
            Type[] contextTypes)
        {
            IEndpointRouteBuilder builder = null;

            if (useEndPointRouteBuilder)
            {
                CreateSimpleServer(config => builder = config);
            }

            Assert.Throws <ArgumentNullException>(
                () => MiddlewareExtensions.MapPowerToolsEFCore(
                    builder,
                    pattern,
                    contextTypes));
        }