Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 965: Special build using pre-release of nunit.engine 4.0.0 #966

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var configuration = Argument("configuration", "Release");
// SET PACKAGE VERSION
//////////////////////////////////////////////////////////////////////

var version = "4.2.1";
var version = "5.0.0";
var modifier = "";

var dbgSuffix = configuration.ToLower() == "debug" ? "-dbg" : "";
Expand Down Expand Up @@ -101,7 +101,7 @@ Task("Clean")
Task("CleanPackages")
.Does(()=>
{
CleanDirectory(PACKAGE_DIR);
CleanDirectory(PACKAGE_DIR);
});

//////////////////////////////////////////////////////////////////////
Expand Down
10 changes: 9 additions & 1 deletion src/NUnitTestAdapter/NUnit.TestAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@
<DisableHandlePackageFileConflicts>false</DisableHandlePackageFileConflicts>
</PropertyGroup>

<!-- We reference a specific pre-release version of the nunit.engine -->
<PropertyGroup>
<RestoreAdditionalProjectSource>https://www.myget.org/F/nunit/api/v3/index.json</RestoreAdditionalProjectSource>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="nunit.engine" Version="4.0.0-dev00100" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" />
<PackageReference Include="nunit.engine" Version="3.13.2" />
<PackageReference Include="TestCentric.Metadata" Version="1.7.1" Aliases="TestCentric" />
</ItemGroup>

Expand Down
6 changes: 4 additions & 2 deletions src/NUnitTestAdapter/NUnitEngine/DiscoveryConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,10 @@ private NUnitDiscoveryTestAssembly ExtractTestAssembly(XElement node, NUnitDisco
private static BaseProperties ExtractSuiteBasePropertiesClass(XElement node)
{
string dId = node.Attribute(NUnitXmlAttributeNames.Id).Value;
string dName = node.Attribute(NUnitXmlAttributeNames.Name).Value;
string dFullname = node.Attribute(NUnitXmlAttributeNames.Fullname).Value;

// test-run no longer has a name/fullname property
string dName = node.Attribute(NUnitXmlAttributeNames.Name)?.Value ?? "Unnamed";
string dFullname = node.Attribute(NUnitXmlAttributeNames.Fullname)?.Value ?? "Unnamed";
var dRunstate = ExtractRunState(node);
const char apo = '\'';
var tcs = node.Attribute(NUnitXmlAttributeNames.Testcasecount)?.Value.Trim(apo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class NUnitDiscoveryTests
private IAdapterSettings settings;

private const string FullDiscoveryXml =
@"<test-run id='2' name='CSharpTestDemo.dll' fullname='D:\repos\NUnit\nunit3-vs-adapter-demo\solutions\vs2017\CSharpTestDemo\bin\Debug\CSharpTestDemo.dll' testcasecount='108'>
@"<test-run id='2' testcasecount='108'>
<test-suite type='Assembly' id='0-1157' name='CSharpTestDemo.dll' fullname='D:\repos\NUnit\nunit3-vs-adapter-demo\solutions\vs2017\CSharpTestDemo\bin\Debug\CSharpTestDemo.dll' runstate='Runnable' testcasecount='108'>
<properties>
<property name='_PID' value='9856' />
Expand Down
7 changes: 1 addition & 6 deletions src/NUnitTestAdapterTests/TestAdapterUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// ***********************************************************************

using Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter;

using NUnit.Engine.Services;
using NUnit.Framework;

namespace NUnit.VisualStudio.TestAdapter.Tests
{
Expand All @@ -49,14 +49,9 @@ private static void InitializeForTesting(NUnitTestAdapter adapter)
adapter.NUnitEngineAdapter.InternalEngineCreated += engine =>
{
var concreteEngineType = (NUnit.Engine.TestEngine)engine;
concreteEngineType.Services.Add(new SettingsService(true));
concreteEngineType.Services.Add(new DomainManager());
concreteEngineType.Services.Add(new ExtensionService());
concreteEngineType.Services.Add(new DriverService());
concreteEngineType.Services.Add(new RecentFilesService());
concreteEngineType.Services.Add(new ProjectService());
concreteEngineType.Services.Add(new RuntimeFrameworkService());
concreteEngineType.Services.Add(new DefaultTestRunnerFactory());
concreteEngineType.Services.Add(new TestAgency()); // "TestAgency for " + TestContext.CurrentContext.Test.Name, 0));
concreteEngineType.Services.Add(new ResultService());
concreteEngineType.Services.Add(new TestFilterService());
Expand Down