Skip to content

Commit

Permalink
Package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
OsirisTerje committed Sep 26, 2023
1 parent 0a7ac08 commit d0913e7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 30 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NUnit 3 VS Test Adapter #

The NUnit 3 Test Adapter runs NUnit 3.x tests in Visual Studio 2012 and newer.
The NUnit 3 Test Adapter runs NUnit 3.x and higher tests in Visual Studio 2012 and newer.



Expand Down
6 changes: 3 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#tool vswhere&version=3.1.1
#tool Microsoft.TestPlatform&version=17.4.0
#tool Microsoft.TestPlatform&version=17.7.2

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand All @@ -13,9 +13,9 @@ var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////


var version = "4.5.0";
var version = "4.6.0";

var modifier = "";
var modifier = "-beta.1";

var dbgSuffix = configuration.ToLower() == "debug" ? "-dbg" : "";
var packageVersion = version + modifier + dbgSuffix;
Expand Down
15 changes: 0 additions & 15 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,4 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
</ItemGroup>

<Target Name="RemoveReferencesToEmbeddedAssembles" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<!-- Don’t copy Mono.Cecil to the output directory. Useful for debugging the embedded loading mechanism. -->
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(Filename)' == 'Mono.Cecil'" />

<!-- Important: remove references to Mono.Cecil at compile time. This is insurance.
If the compiled assembly has a reference to Mono.Cecil, the VSTest could try to load Mono.Cecil
while reflecting over the adapter types looking for interface implementations. Since VSTest would
be triggering the load of Mono.Cecil before we have a chance to handle AssemblyResolve, the load
would fail. VSTest does ignore the adapter assembly in this scenario. -->
<ReferencePath Remove="@(ReferencePath)" Condition="'%(ReferencePath.NuGetPackageId)' == 'Mono.Cecil'" />
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ItemGroup>
<PackageReference Include="nunit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit.Analyzers" Version="3.8.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
13 changes: 6 additions & 7 deletions src/NUnitTestAdapterTests/AdapterSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,7 @@ public void TestOutputSetting()
_settings.Load(@"<RunSettings><NUnit><WorkDirectory>C:\Whatever</WorkDirectory><TestOutputXml>/my/work/dir</TestOutputXml></NUnit></RunSettings>");
Assert.That(_settings.UseTestOutputXml);
_settings.SetTestOutputFolder(_settings.WorkDirectory);
Assert.Multiple(() =>
{
Assert.That(_settings.TestOutputFolder, Does.Contain(@"/my/work/dir"));
});
Assert.That(_settings.TestOutputFolder, Does.Contain(@"/my/work/dir"));
}

/// <summary>
Expand Down Expand Up @@ -260,11 +257,13 @@ public void TestOutputSettingAsSpecified()
_settings.Load(@"<RunSettings><NUnit><TestOutputXml>c:\whatever</TestOutputXml></NUnit></RunSettings>");
Assert.That(_settings.UseTestOutputXml, "Settings not loaded properly");
_settings.SetTestOutputFolder(_settings.WorkDirectory);
Assert.That(_settings.TestOutputFolder, Is.EqualTo(@"c:\whatever"), "Content not correct");
Assert.That(_settings.OutputXmlFolderMode, Is.EqualTo(OutputXmlFolderMode.AsSpecified), "Should be set default AsSpecified with absolute path in");
Assert.Multiple(() =>
{
Assert.That(_settings.TestOutputFolder, Is.EqualTo(@"c:\whatever"), "Content not correct");
Assert.That(_settings.OutputXmlFolderMode, Is.EqualTo(OutputXmlFolderMode.AsSpecified), "Should be set default AsSpecified with absolute path in");
});
}


[Test]
public void NumberOfTestWorkersSetting()
{
Expand Down
6 changes: 3 additions & 3 deletions src/NUnitTestAdapterTests/NUnit.TestAdapter.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="11.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit d0913e7

Please sign in to comment.