Skip to content

Commit

Permalink
Update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo committed Mar 22, 2022
1 parent 0828e87 commit 355386f
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ public class DefaultOpenApiConfigurationOptionsTests
[TestMethod]
public void Given_Type_When_Instantiated_Then_Properties_Should_Return_Value()
{
Environment.SetEnvironmentVariable("OpenApi__DocVersion", null);
Environment.SetEnvironmentVariable("OpenApi__DocTitle", null);
Environment.SetEnvironmentVariable("OpenApi__HostNames", null);
Environment.SetEnvironmentVariable("OpenApi__Version", null);
Environment.SetEnvironmentVariable("AZURE_FUNCTIONS_ENVIRONMENT", "Development");
Environment.SetEnvironmentVariable("OpenApi__ForceHttp", null);
Environment.SetEnvironmentVariable("OpenApi__ForceHttps", null);

var options = new DefaultOpenApiConfigurationOptions();

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

options.OpenApiVersion.Should().Be(OpenApiVersionType.V2);
options.IncludeRequestingHostName.Should().BeFalse();
options.IncludeRequestingHostName.Should().BeTrue();
options.ForceHttp.Should().BeFalse();
options.ForceHttps.Should().BeFalse();
}

[DataTestMethod]
Expand Down

0 comments on commit 355386f

Please sign in to comment.