private void ShouldReturnTrueForAllEnvironments(string environmentName) { var hostingEnvironment = new TestHostingEnvironment { EnvironmentName = environmentName }; var options = new SeoOptions(); DefaultOptions.Configure(options, hostingEnvironment); options.RobotsTxt.AddSitemapUrl.Should().BeTrue(); }
private void ShouldAllowSiteWideAccessInProduction(string environmentName, bool expected) { var hostingEnvironment = new TestHostingEnvironment { EnvironmentName = environmentName }; var options = new SeoOptions(); DefaultOptions.Configure(options, hostingEnvironment); UserAgentRecord userAgentRecord = options.RobotsTxt.UserAgentRecords.Single(); userAgentRecord.DisallowAll.Should().Be(expected); }