Update tests for .NET 6
This commit is contained in:
parent
66318e6fc4
commit
9ec9fce35e
5 changed files with 11 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
|
<TargetPlatformIdentifier>Windows</TargetPlatformIdentifier>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -29,10 +29,13 @@
|
||||||
<_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</_NETCorePlatformsPackageVersion>
|
<_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</_NETCorePlatformsPackageVersion>
|
||||||
|
|
||||||
<!-- TODO: Once .NET 5.0 has released, update these version numbers to 5.0.0 -->
|
<!-- TODO: Once .NET 5.0 has released, update these version numbers to 5.0.0 -->
|
||||||
|
<_NET50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.5</_NET50DefaultRuntimeFrameworkVersion>
|
||||||
<_NET50RuntimePackVersion>5.0.0-rc.2.20475.5</_NET50RuntimePackVersion>
|
<_NET50RuntimePackVersion>5.0.0-rc.2.20475.5</_NET50RuntimePackVersion>
|
||||||
<_NET50TargetingPackVersion>5.0.0-rc.2.20475.5</_NET50TargetingPackVersion>
|
<_NET50TargetingPackVersion>5.0.0-rc.2.20475.5</_NET50TargetingPackVersion>
|
||||||
|
<_WindowsDesktop50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.6</_WindowsDesktop50DefaultRuntimeFrameworkVersion>
|
||||||
<_WindowsDesktop50RuntimePackVersion>5.0.0-rc.2.20475.6</_WindowsDesktop50RuntimePackVersion>
|
<_WindowsDesktop50RuntimePackVersion>5.0.0-rc.2.20475.6</_WindowsDesktop50RuntimePackVersion>
|
||||||
<_WindowsDesktop50TargetingPackVersion>5.0.0-rc.2.20475.6</_WindowsDesktop50TargetingPackVersion>
|
<_WindowsDesktop50TargetingPackVersion>5.0.0-rc.2.20475.6</_WindowsDesktop50TargetingPackVersion>
|
||||||
|
<_AspNet50DefaultRuntimeFrameworkVersion>5.0.0-rc.2.20475.17</_AspNet50DefaultRuntimeFrameworkVersion>
|
||||||
<_AspNet50RuntimePackVersion>5.0.0-rc.2.20475.17</_AspNet50RuntimePackVersion>
|
<_AspNet50RuntimePackVersion>5.0.0-rc.2.20475.17</_AspNet50RuntimePackVersion>
|
||||||
<_AspNet50TargetingPackVersion>5.0.0-rc.2.20475.17</_AspNet50TargetingPackVersion>
|
<_AspNet50TargetingPackVersion>5.0.0-rc.2.20475.17</_AspNet50TargetingPackVersion>
|
||||||
|
|
||||||
|
@ -331,7 +334,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
||||||
TargetFramework="net5.0"
|
TargetFramework="net5.0"
|
||||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||||
DefaultRuntimeFrameworkVersion="5.0.0"
|
DefaultRuntimeFrameworkVersion="$(_NET50DefaultRuntimeFrameworkVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_NET50RuntimePackVersion)"
|
LatestRuntimeFrameworkVersion="$(_NET50RuntimePackVersion)"
|
||||||
TargetingPackName="Microsoft.NETCore.App.Ref"
|
TargetingPackName="Microsoft.NETCore.App.Ref"
|
||||||
TargetingPackVersion="$(_NET50TargetingPackVersion)"
|
TargetingPackVersion="$(_NET50TargetingPackVersion)"
|
||||||
|
@ -357,7 +360,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
|
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
|
||||||
TargetFramework="net5.0"
|
TargetFramework="net5.0"
|
||||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||||
DefaultRuntimeFrameworkVersion="5.0.0"
|
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop50DefaultRuntimeFrameworkVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
||||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||||
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
||||||
|
@ -369,7 +372,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
|
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
|
||||||
TargetFramework="net5.0"
|
TargetFramework="net5.0"
|
||||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||||
DefaultRuntimeFrameworkVersion="5.0.0"
|
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop50DefaultRuntimeFrameworkVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
||||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||||
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
||||||
|
@ -382,7 +385,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
|
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
|
||||||
TargetFramework="net5.0"
|
TargetFramework="net5.0"
|
||||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||||
DefaultRuntimeFrameworkVersion="5.0.0"
|
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop50DefaultRuntimeFrameworkVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
LatestRuntimeFrameworkVersion="$(_WindowsDesktop50RuntimePackVersion)"
|
||||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||||
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
|
||||||
|
@ -395,7 +398,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
|
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
|
||||||
TargetFramework="net5.0"
|
TargetFramework="net5.0"
|
||||||
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
||||||
DefaultRuntimeFrameworkVersion="5.0.0"
|
DefaultRuntimeFrameworkVersion="$(_AspNet50DefaultRuntimeFrameworkVersion)"
|
||||||
LatestRuntimeFrameworkVersion="$(_AspNet50RuntimePackVersion)"
|
LatestRuntimeFrameworkVersion="$(_AspNet50RuntimePackVersion)"
|
||||||
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
||||||
TargetingPackVersion="$(_AspNet50TargetingPackVersion)"
|
TargetingPackVersion="$(_AspNet50TargetingPackVersion)"
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
{
|
{
|
||||||
var testProjectCreator = new TestProjectCreator()
|
var testProjectCreator = new TestProjectCreator()
|
||||||
{
|
{
|
||||||
MinorVersion = "5.0"
|
MinorVersion = "6.0"
|
||||||
};
|
};
|
||||||
|
|
||||||
testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
|
testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
|
||||||
|
|
|
@ -10,7 +10,7 @@ using Xunit;
|
||||||
|
|
||||||
namespace EndToEnd
|
namespace EndToEnd
|
||||||
{
|
{
|
||||||
public class GivenWindows50App : TestBase
|
public class GivenWindowsApp : TestBase
|
||||||
{
|
{
|
||||||
[WindowsOnlyTheory]
|
[WindowsOnlyTheory]
|
||||||
[InlineData("10.0.17763.0")]
|
[InlineData("10.0.17763.0")]
|
|
@ -40,16 +40,5 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
.FailWith($"Expected File {_fileInfo.FullName} to not exist, but it does.");
|
.FailWith($"Expected File {_fileInfo.FullName} to not exist, but it does.");
|
||||||
return new AndConstraint<FileInfoAssertions>(this);
|
return new AndConstraint<FileInfoAssertions>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AndWhichConstraint<FileInfoAssertions, DateTimeOffset> HaveLastWriteTimeUtc(string because = "", params object[] reasonArgs)
|
|
||||||
{
|
|
||||||
var lastWriteTimeUtc = _fileInfo.LastWriteTimeUtc;
|
|
||||||
|
|
||||||
Execute.Assertion
|
|
||||||
.ForCondition(lastWriteTimeUtc != null)
|
|
||||||
.BecauseOf(because, reasonArgs)
|
|
||||||
.FailWith($"Expected File {_fileInfo.FullName} to have a LastWriteTimeUTC, but it is null.");
|
|
||||||
return new AndWhichConstraint<FileInfoAssertions, DateTimeOffset>(this, lastWriteTimeUtc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue