Skip to content

Commit

Permalink
Merge in 'release/8.0.1xx-rc1' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Aug 22, 2023
2 parents a8ab70f + 57e69bd commit 6c278c1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ public void It_resolves_requestdelegategenerator_correctly(string testAssetName,
VerifyInterceptorsFeatureEnabled(asset, isEnabled);
}

[Theory]
[InlineData("WebApp", false)]
[InlineData("WebApp", true)]
[InlineData("WebApp", null)]
public void It_resolves_configbindinggenerator_correctly(string testAssetName, bool? isEnabled)
{
var asset = _testAssetsManager
.CopyTestAsset(testAssetName, identifier: isEnabled.ToString())
.WithSource()
.WithProjectChanges(project =>
{
if (isEnabled != null)
{
var ns = project.Root.Name.Namespace;
project.Root.Add(new XElement(ns + "PropertyGroup", new XElement("EnableConfigurationBindingGenerator", isEnabled)));
}
});

VerifyConfigBindingGeneratorIsUsed(asset, isEnabled);
VerifyInterceptorsFeatureEnabled(asset, isEnabled);
}

[Fact]
public void It_enables_requestdelegategenerator_and_configbindinggenerator_for_PublishAot()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<EnableConfigurationBindingGenerator Condition="'$(EnableConfigurationBindingGenerator)' == ''">true</EnableConfigurationBindingGenerator>
</PropertyGroup>

<!-- Enable the interceptors compiler feature by default for projects that use the RequestDelegateGenerator. -->
<PropertyGroup Condition="'$(EnableRequestDelegateGenerator)' == 'true'">
<!-- Enable the interceptors compiler feature by default for projects that use the RequestDelegateGenerator or the ConfigurationBindingGenerator. -->
<PropertyGroup Condition="'$(EnableRequestDelegateGenerator)' == 'true' Or '$(EnableConfigurationBindingGenerator)' == 'true'">
<Features>$(Features);InterceptorsPreview</Features>
</PropertyGroup>

Expand Down

0 comments on commit 6c278c1

Please sign in to comment.