Skip to content

Commit 355386f

Browse files
committed
Update test cases
1 parent 0828e87 commit 355386f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.Tests/Configurations/DefaultOpenApiConfigurationOptionsTests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ public class DefaultOpenApiConfigurationOptionsTests
1717
[TestMethod]
1818
public void Given_Type_When_Instantiated_Then_Properties_Should_Return_Value()
1919
{
20+
Environment.SetEnvironmentVariable("OpenApi__DocVersion", null);
21+
Environment.SetEnvironmentVariable("OpenApi__DocTitle", null);
22+
Environment.SetEnvironmentVariable("OpenApi__HostNames", null);
23+
Environment.SetEnvironmentVariable("OpenApi__Version", null);
24+
Environment.SetEnvironmentVariable("AZURE_FUNCTIONS_ENVIRONMENT", "Development");
25+
Environment.SetEnvironmentVariable("OpenApi__ForceHttp", null);
26+
Environment.SetEnvironmentVariable("OpenApi__ForceHttps", null);
27+
2028
var options = new DefaultOpenApiConfigurationOptions();
2129

2230
options.Info.Should().NotBeNull();
@@ -27,7 +35,9 @@ public void Given_Type_When_Instantiated_Then_Properties_Should_Return_Value()
2735
options.Servers.Should().HaveCount(0);
2836

2937
options.OpenApiVersion.Should().Be(OpenApiVersionType.V2);
30-
options.IncludeRequestingHostName.Should().BeFalse();
38+
options.IncludeRequestingHostName.Should().BeTrue();
39+
options.ForceHttp.Should().BeFalse();
40+
options.ForceHttps.Should().BeFalse();
3141
}
3242

3343
[DataTestMethod]

0 commit comments

Comments
 (0)