Skip to content

Commit

Permalink
Update properties to be virtual on DefaultOpenApiConfigurationOptions (
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo authored and Derich367 committed Jan 30, 2023
1 parent 00df753 commit 8d9003e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public class DefaultOpenApiConfigurationOptions : IOpenApiConfigurationOptions
public virtual bool IncludeRequestingHostName { get; set; } = IsFunctionsRuntimeEnvironmentDevelopment();

/// <inheritdoc />
public bool ForceHttp { get; set; } = IsHttpForced();
public virtual bool ForceHttp { get; set; } = IsHttpForced();

/// <inheritdoc />
public bool ForceHttps { get; set; } = IsHttpsForced();
public virtual bool ForceHttps { get; set; } = IsHttpsForced();

/// <inheritdoc />
public List<IDocumentFilter> DocumentFilters { get; set; } = new List<IDocumentFilter>();
public virtual List<IDocumentFilter> DocumentFilters { get; set; } = new List<IDocumentFilter>();

/// <summary>
/// Gets the OpenAPI document version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,13 @@ public void Given_EnvironmentVariable_When_IsHttpsForced_Invoked_Then_It_Should_
result.Should().BeOfType<bool>();
((bool)result).Should().Be(expected);
}

public void Given_Type_When_Instantiated_Then_It_Should_Return_EmptyListOfDocumentFilters()
{
var options = new DefaultOpenApiConfigurationOptions();

options.DocumentFilters.Should().NotBeNull();
options.DocumentFilters.Should().BeEmpty();
}
}
}

0 comments on commit 8d9003e

Please sign in to comment.