コード例 #1
0
            protected override void Arrange()
            {
                var startup = new TestStartup();

                _config = new HttpConfiguration
                {
                    IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always
                };

                startup.ExternalizeInitializeContainer();
                startup.ExternalizeConfigureRoutes(_config, useSchoolYear: true);
                _config.EnsureInitialized();
                _routeTester = new RouteTester(_config);

                _resultValidator = x =>
                {
                    if (string.IsNullOrEmpty(x))
                    {
                        Assert.Fail("Invalid Url matched a controller: " + x);
                    }
                };
            }