-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduction Sample for microsoft/testfx#3856
- Loading branch information
0 parents
commit 1da8f5c
Showing
8 changed files
with
607 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" /> | ||
<PackageVersion Include="MSTest.TestAdapter" Version="3.6.0" /> | ||
<PackageVersion Include="MSTest.TestFramework" Version="3.6.0" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' Or '$(TargetFramework)' == 'net48'"> | ||
<PackageVersion Include="Microsoft.AspNetCore" Version="2.1.7" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Authentication" Version="2.1.2" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dummy.AspNetCore", "src\Dummy.AspNetCore\Dummy.AspNetCore.csproj", "{FFA3B6C8-8371-4B82-811D-BE8F1EB6DD6A}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dummy.UnitTests", "test\Dummy.UnitTests\Dummy.UnitTests.csproj", "{1EBE46F7-CB3C-46A9-84BE-6567AA7DA147}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projektmappenelemente", "Projektmappenelemente", "{9D0881D0-D78F-4156-85FB-90F60D00B877}" | ||
ProjectSection(SolutionItems) = preProject | ||
Directory.Packages.props = Directory.Packages.props | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{FFA3B6C8-8371-4B82-811D-BE8F1EB6DD6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{FFA3B6C8-8371-4B82-811D-BE8F1EB6DD6A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{FFA3B6C8-8371-4B82-811D-BE8F1EB6DD6A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{FFA3B6C8-8371-4B82-811D-BE8F1EB6DD6A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{1EBE46F7-CB3C-46A9-84BE-6567AA7DA147}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1EBE46F7-CB3C-46A9-84BE-6567AA7DA147}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1EBE46F7-CB3C-46A9-84BE-6567AA7DA147}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1EBE46F7-CB3C-46A9-84BE-6567AA7DA147}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {5F49C05A-2D27-4AAE-BBD0-997102E9C6F3} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Dummy.AspNetCore; | ||
|
||
public class Class1 | ||
{ | ||
public void DummyMethod(Microsoft.AspNetCore.Authentication.AuthenticationScheme authScheme) | ||
{ | ||
if (string.IsNullOrEmpty(authScheme.Name)) | ||
throw new Exception("Dummy"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>Latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="Microsoft.AspNetCore" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Authentication" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'"> | ||
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>net48;net8.0</TargetFrameworks> | ||
<IsPackable>false</IsPackable> | ||
<LangVersion>latest</LangVersion> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>Latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="MSTest.TestAdapter"> | ||
<TreatAsUsed>true</TreatAsUsed> | ||
</PackageReference> | ||
<PackageReference Include="MSTest.TestFramework" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Dummy.AspNetCore\Dummy.AspNetCore.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[assembly: Parallelize(Scope = ExecutionScope.ClassLevel)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Dummy.AspNetCore; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace Dummy.UnitTests; | ||
|
||
[TestClass] | ||
public sealed class Test1 | ||
{ | ||
[TestMethod] | ||
public void TestMethod1() | ||
{ | ||
var authScheme = new Microsoft.AspNetCore.Authentication.AuthenticationScheme("Name", "DisplayName", typeof(string)); | ||
|
||
var dummy = new Class1(); | ||
dummy.DummyMethod(authScheme); | ||
} | ||
} |