Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit f19f875

Browse files
authored
Merge pull request #66 from TestCentric/issue-1322b
Restore and reorganize tests
2 parents f70d5f2 + 03b16a1 commit f19f875

File tree

8 files changed

+151
-122
lines changed

8 files changed

+151
-122
lines changed

NuGet.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
55
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
66
<add key="TestCentric MyGet V2 Feed" value="https://www.myget.org/F/testcentric/api/v2/" />
7-
<add key="TestCentric MyGet V3 Feed" value="https://www.myget.org/F/testcentric/api/v3/index.json" />
7+
<add key="TestCentric MyGet V3 Feed" value="https://www.myget.org/F/testcentric/api/v3/index.json" />
8+
<add key="NUnit MyGet V3 Feed" value="https://www.myget.org/F/nunit/api/v3/index.json" />
89
</packageSources>
910
</configuration>

build.cake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Load the recipe
2-
#load nuget:?package=TestCentric.Cake.Recipe&version=1.4.1-dev00004
2+
#load nuget:?package=TestCentric.Cake.Recipe&version=1.5.0-dev00006
33
// Comment out above line and uncomment below for local tests of recipe changes
44
//#load ../TestCentric.Cake.Recipe/recipe/*.cake
55

@@ -19,8 +19,8 @@ BuildSettings.Packages.Add(new NuGetPackage(
1919
source: "nuget/TestCentric.Extensibility.nuspec",
2020
checks: new PackageCheck[] {
2121
HasFiles("LICENSE.txt", "README.md", "testcentric.png"),
22-
HasDirectory("lib/net20")
23-
.WithFiles("TestCentric.Extensibility.dll", "TestCentric.Extensibility.api.dll", "nunit.engine.api.dll"),
22+
//HasDirectory("lib/net20")
23+
// .WithFiles("TestCentric.Extensibility.dll", "TestCentric.Extensibility.api.dll", "nunit.engine.api.dll"),
2424
HasDirectory("lib/net462")
2525
.WithFiles("testcentric.extensibility.dll", "TestCentric.Extensibility.api.dll", "nunit.engine.api.dll"),
2626
HasDirectory("lib/netstandard2.0")
@@ -49,7 +49,7 @@ BuildSettings.Packages.Add(new NuGetPackage(
4949
checks: new PackageCheck[] {
5050
HasFiles(
5151
"LICENSE.txt", "README.md", "testcentric.png",
52-
"lib/net20/testcentric.extensibility.api.dll",
52+
//"lib/net20/testcentric.extensibility.api.dll",
5353
"lib/net462/testcentric.extensibility.api.dll",
5454
"lib/netstandard2.0/testcentric.extensibility.api.dll") }));
5555

nuget/TestCentric.Extensibility.Api.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<file src="../../README.md" />
1919
<file src="../../LICENSE.txt" />
2020
<file src="../../testcentric.png" />
21-
<file src="net20/TestCentric.Extensibility.Api.dll" target="lib/net20" />
21+
<!--<file src="net20/TestCentric.Extensibility.Api.dll" target="lib/net20" />-->
2222
<file src="net462/TestCentric.Extensibility.Api.dll" target="lib/net462" />
2323
<file src="netstandard2.0/TestCentric.Extensibility.Api.dll" target="lib/netstandard2.0" />
2424
</files>

nuget/TestCentric.Extensibility.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
<file src="../../README.md" />
2323
<file src="../../LICENSE.txt" />
2424
<file src="../../testcentric.png" />
25-
<file src="net20/TestCentric.Extensibility.dll" target="lib/net20" />
25+
<!--<file src="net20/TestCentric.Extensibility.dll" target="lib/net20" />
2626
<file src="net20/TestCentric.Extensibility.pdb" target="lib/net20" />
2727
<file src="net20/TestCentric.Extensibility.Api.dll" target="lib/net20" />
2828
<file src="net20/TestCentric.Extensibility.Api.pdb" target="lib/net20" />
29-
<file src="net20/nunit.engine.api.dll" target="lib/net20" />
29+
<file src="net20/nunit.engine.api.dll" target="lib/net20" />-->
3030
<file src="net462/TestCentric.Extensibility.dll" target="lib/net462" />
3131
<file src="net462/TestCentric.Extensibility.pdb" target="lib/net462" />
3232
<file src="net462/TestCentric.Extensibility.Api.dll" target="lib/net462" />

src/Directory.Build.props

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@
2323
<DebugSymbols>true</DebugSymbols>
2424
<!-- Commonly Used Package Versions -->
2525
<AnnotatedReferenceAssemblyVersion>8.0.0</AnnotatedReferenceAssemblyVersion>
26-
<EngineVersion>2.0.0-dev01905</EngineVersion>
26+
<EngineVersion>2.0.0-dev01907</EngineVersion>
2727
<MetadataVersion>3.0.4</MetadataVersion>
2828
<InternalTraceVersion>1.2.1</InternalTraceVersion>
29-
<NUnitApiVersion>3.16.2</NUnitApiVersion>
3029
<!-- Informational Settings -->
3130
<Company>TestCentric</Company>
3231
<Product>TestCentric Gui Runner and Engine</Product>
@@ -36,6 +35,11 @@
3635
<NSubstitutePublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</NSubstitutePublicKey>
3736
</PropertyGroup>
3837

38+
<!-- Version of NUnit.Engine.Api depends on target framework -->
39+
<PropertyGroup Condition="'$(TargetFramework)'=='net35' OR '$(TargetFramework)'=='net20'">
40+
<NUnitApiVersion>3.16.2</NUnitApiVersion>
41+
</PropertyGroup>
42+
3943
<!-- Version of NUnit used depends on the target framework -->
4044
<PropertyGroup Condition="'$(TargetFramework)'=='net35'
4145
OR '$(TargetFramework)'=='netcoreapp2.1' OR '$(TargetFramework)'=='netcoreapp3.1'
@@ -44,10 +48,11 @@
4448
<NSubstituteVersion>2.0.3</NSubstituteVersion>
4549
</PropertyGroup>
4650

47-
<!-- Default NUnit version for targets not listed above -->
51+
<!-- Default versions for targets not handled by conditions listed above -->
4852
<PropertyGroup>
4953
<NUnitVersion Condition="'$(NUnitVersion)'==''">4.1.0</NUnitVersion>
5054
<NSubstituteVersion Condition="'$(NSubstituteVersion)'==''">5.3.0</NSubstituteVersion>
55+
<NUnitApiVersion Condition="'$(NUnitApiVersion)'==''">4.0.0-beta.1.1</NUnitApiVersion>
5156
</PropertyGroup>
5257

5358
<!-- Common package metadata, may be overridden in individual projects -->

src/testcentric.extensibility.fakes/FakeExtensions.cs

Lines changed: 60 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,40 @@
33
// Licensed under the MIT License. See LICENSE file in root directory.
44
// ***********************************************************************
55

6-
using TestCentric.Extensibility;
7-
using TestCentric.Engine.Services;
8-
96
using System.Diagnostics;
107
using System;
118
using System.Reflection;
129
using System.Xml;
1310
using System.IO;
1411

15-
#if false
1612
namespace TestCentric.Engine.Extensibility
1713
{
18-
// Extensions
19-
20-
[Extension(Enabled = false, Path = "/TestCentric/Engine/TypeExtensions/ITestEventListener")]
21-
public class FakeTestEventListener : ITestEventListener
22-
{
23-
public void OnTestEvent(string text)
24-
{
25-
throw new System.NotImplementedException();
26-
}
27-
}
14+
using TestCentric.Extensibility;
2815

29-
//[Extension]
30-
public class FakeService : IService
16+
[Extension]
17+
public class FakeAgentLauncher : IAgentLauncher
3118
{
32-
public IServiceLocator ServiceContext { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
33-
34-
public ServiceStatus Status => throw new System.NotImplementedException();
19+
public TestAgentInfo AgentInfo => throw new NotImplementedException();
3520

36-
public void StartService()
21+
public bool CanCreateProcess(TestPackage package)
3722
{
38-
throw new System.NotImplementedException();
23+
throw new NotImplementedException();
3924
}
4025

41-
public void StopService()
26+
public Process CreateProcess(Guid agentId, string agencyUrl, TestPackage package)
4227
{
43-
throw new System.NotImplementedException();
28+
throw new NotImplementedException();
4429
}
4530
}
4631

47-
[Extension]
48-
public class FakeAgentLauncher : TestCentric.Engine.Extensibility.IAgentLauncher
32+
[Extension(Enabled = false)]
33+
public class FakeAgentLauncher_ThrowsInConstructor : IAgentLauncher
4934
{
35+
public FakeAgentLauncher_ThrowsInConstructor()
36+
{
37+
throw new NotImplementedException();
38+
}
39+
5040
public TestAgentInfo AgentInfo => throw new NotImplementedException();
5141

5242
public bool CanCreateProcess(TestPackage package)
@@ -59,26 +49,58 @@ public Process CreateProcess(Guid agentId, string agencyUrl, TestPackage package
5949
throw new NotImplementedException();
6050
}
6151
}
52+
}
6253

63-
//[Extension]
64-
public class FakeDriverFactory : IDriverFactory
65-
{
66-
#if NETFRAMEWORK
67-
public IFrameworkDriver GetDriver(AppDomain domain, AssemblyName reference)
54+
namespace NUnit.Engine.Extensibility
55+
{
56+
#if NET20
57+
using NUnit.Engine.Extensibility;
6858
#else
69-
public IFrameworkDriver GetDriver(AssemblyName reference)
59+
using NUnit.Extensibility;
7060
#endif
61+
62+
[Extension(Enabled = false, Path = "/NUnit/Engine/TypeExtensions/ITestEventListener")]
63+
public class FakeTestEventListener : ITestEventListener
64+
{
65+
public void OnTestEvent(string text)
7166
{
72-
throw new NotImplementedException();
67+
throw new System.NotImplementedException();
7368
}
69+
}
7470

75-
public bool IsSupportedTestFramework(AssemblyName reference)
71+
[Extension(Path = "/NUnit/Engine/TypeExtensions/IProjectLoader")]
72+
public class FakeProjectLoader : IProjectLoader
73+
{
74+
public bool CanLoadFrom(string path)
7675
{
77-
throw new NotImplementedException();
76+
throw new System.NotImplementedException();
77+
}
78+
79+
public NUnit.Engine.Extensibility.IProject LoadFrom(string path)
80+
{
81+
throw new System.NotImplementedException();
7882
}
7983
}
8084

81-
//[Extension]
85+
// [Extension]
86+
// public class FakeDriverFactory : IDriverFactory
87+
// {
88+
//#if NETFRAMEWORK
89+
// public IFrameworkDriver GetDriver(AppDomain domain, AssemblyName reference)
90+
//#else
91+
// public IFrameworkDriver GetDriver(AssemblyName reference)
92+
//#endif
93+
// {
94+
// throw new NotImplementedException();
95+
// }
96+
97+
// public bool IsSupportedTestFramework(AssemblyName reference)
98+
// {
99+
// throw new NotImplementedException();
100+
// }
101+
// }
102+
103+
[Extension]
82104
public class FakeResultWriter : IResultWriter
83105
{
84106
public void CheckWritability(string outputPath)
@@ -97,10 +119,10 @@ public void WriteResultFile(XmlNode resultNode, TextWriter writer)
97119
}
98120
}
99121

100-
[Extension(Enabled = false)]
101-
public class FakeExtension_ThrowsInConstructor : ITestEventListener
122+
[Extension(Enabled = false, Path = "/NUnit/Engine/TypeExtensions/ITestEventListener")]
123+
public class FakeNUnitExtension_ThrowsInConstructor : ITestEventListener
102124
{
103-
public FakeExtension_ThrowsInConstructor()
125+
public FakeNUnitExtension_ThrowsInConstructor()
104126
{
105127
throw new NotImplementedException();
106128
}
@@ -111,22 +133,3 @@ public void OnTestEvent(string text)
111133
}
112134
}
113135
}
114-
#endif
115-
116-
namespace NUnit.Engine.Extensibility
117-
{
118-
//[Extension(Path = "/NUnit/Engine/TypeExtensions/IProjectLoader/")]
119-
[Extension]
120-
public class FakeProjectLoader : IProjectLoader
121-
{
122-
public bool CanLoadFrom(string path)
123-
{
124-
throw new System.NotImplementedException();
125-
}
126-
127-
public NUnit.Engine.Extensibility.IProject LoadFrom(string path)
128-
{
129-
throw new System.NotImplementedException();
130-
}
131-
}
132-
}

0 commit comments

Comments
 (0)