Skip to content

Commit 7a0f8e9

Browse files
committed
enable Unit.Runner to run tests in net45
1 parent 34214dc commit 7a0f8e9

File tree

5 files changed

+97
-24
lines changed

5 files changed

+97
-24
lines changed

projects/client/Unit.Runner/project.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@
44
"emitEntryPoint": true
55
},
66
"dependencies": {
7-
"Microsoft.NETCore.App": {
8-
"type": "platform",
9-
"version": "1.0.0-rc2-3002702"
10-
},
117
"Unit": "*"
128
},
139
"frameworks": {
10+
"net45": {
11+
"dependencies": {
12+
"NUnit": "*",
13+
"NUnitLite": "*",
14+
"Unit": "*"
15+
}
16+
},
1417
"netcoreapp1.0": {
1518
"imports": "dnxcore50",
1619
"dependencies": {
20+
"Microsoft.NETCore.App": {
21+
"type": "platform",
22+
"version": "1.0.0-rc2-3002702"
23+
},
1724
"System.Runtime": "4.1.0-rc2-24027",
1825
"NUnit": "*",
19-
"NUnitLite": "*"
26+
"NUnitLite": "*",
27+
"Unit": "*"
2028
}
2129
}
2230
}

projects/client/Unit.Runner/project.lock.json

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,6 +2314,41 @@
23142314
"dotnet-test-nunit": "3.3.0.49-CI"
23152315
}
23162316
}
2317+
},
2318+
".NETFramework,Version=v4.5": {
2319+
"NUnit/3.2.1": {
2320+
"type": "package",
2321+
"compile": {
2322+
"lib/net45/nunit.framework.dll": {}
2323+
},
2324+
"runtime": {
2325+
"lib/net45/nunit.framework.dll": {}
2326+
}
2327+
},
2328+
"NUnitLite/3.2.1": {
2329+
"type": "package",
2330+
"dependencies": {
2331+
"NUnit": "[3.2.1]"
2332+
},
2333+
"compile": {
2334+
"lib/net45/nunitlite.dll": {}
2335+
},
2336+
"runtime": {
2337+
"lib/net45/nunitlite.dll": {}
2338+
}
2339+
},
2340+
"RabbitMQ.Client/4.0.0": {
2341+
"type": "project",
2342+
"framework": ".NETFramework,Version=v4.5"
2343+
},
2344+
"Unit/1.0.0": {
2345+
"type": "project",
2346+
"framework": ".NETFramework,Version=v4.5",
2347+
"dependencies": {
2348+
"NUnit": "3.2.1",
2349+
"RabbitMQ.Client": "1.0.0"
2350+
}
2351+
}
23172352
}
23182353
},
23192354
"libraries": {
@@ -7250,13 +7285,19 @@
72507285
},
72517286
"projectFileDependencyGroups": {
72527287
"": [
7253-
"Microsoft.NETCore.App >= 1.0.0-rc2-3002702",
72547288
"Unit"
72557289
],
72567290
".NETCoreApp,Version=v1.0": [
7291+
"Microsoft.NETCore.App >= 1.0.0-rc2-3002702",
7292+
"NUnit",
7293+
"NUnitLite",
7294+
"System.Runtime >= 4.1.0-rc2-24027",
7295+
"Unit"
7296+
],
7297+
".NETFramework,Version=v4.5": [
72577298
"NUnit",
72587299
"NUnitLite",
7259-
"System.Runtime >= 4.1.0-rc2-24027"
7300+
"Unit"
72607301
]
72617302
},
72627303
"tools": {},

projects/client/Unit/project.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
{
22
"version": "1.0.0-*",
33
"buildOptions": {
4-
"emitEntryPoint": true
4+
"emitEntryPoint": false
55
},
66
"dependencies": {
7-
"Microsoft.NETCore.App": {
8-
"type": "platform",
9-
"version": "1.0.0-rc2-3002702"
10-
},
11-
"RabbitMQ.Client": "*",
12-
"Microsoft.DiaSymReader": "1.0.8-rc2-60325",
13-
"dotnet-test-nunit": "3.3.0.49-CI"
147
},
158
"testRunner": "nunit",
169
"code": ["**/*.cs"],
1710
"frameworks": {
11+
"net45": {
12+
"dependencies": {
13+
"NUnit": "3.2.1",
14+
"RabbitMQ.Client": "*"
15+
}
16+
},
1817
"netcoreapp1.0": {
1918
"imports": "dnxcore50",
2019
"dependencies": {
20+
"Microsoft.NETCore.App": {
21+
"type": "platform",
22+
"version": "1.0.0-rc2-3002702"
23+
},
2124
"System.Runtime": "4.1.0-rc2-24027",
2225
"System.Collections": "4.0.11-rc2-24027",
2326
"System.Collections.NonGeneric": "4.0.1-rc2-24027",
@@ -31,7 +34,10 @@
3134
"System.Net.Sockets": "4.1.0-rc2-24027",
3235
"System.Threading": "4.0.11-rc2-24027",
3336
"System.Threading.Tasks": "4.0.11-rc2-24027",
34-
"NUnit": "3.2.1"
37+
"NUnit": "3.2.1",
38+
"RabbitMQ.Client": "*",
39+
"Microsoft.DiaSymReader": "1.0.8-rc2-60325",
40+
"dotnet-test-nunit": "3.3.0.49-CI"
3541
}
3642
}
3743
}

projects/client/Unit/project.lock.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,6 +2278,21 @@
22782278
"System.Threading.Thread": "4.0.0-rc2-24027"
22792279
}
22802280
}
2281+
},
2282+
".NETFramework,Version=v4.5": {
2283+
"NUnit/3.2.1": {
2284+
"type": "package",
2285+
"compile": {
2286+
"lib/net45/nunit.framework.dll": {}
2287+
},
2288+
"runtime": {
2289+
"lib/net45/nunit.framework.dll": {}
2290+
}
2291+
},
2292+
"RabbitMQ.Client/4.0.0": {
2293+
"type": "project",
2294+
"framework": ".NETFramework,Version=v4.5"
2295+
}
22812296
}
22822297
},
22832298
"libraries": {
@@ -7184,14 +7199,12 @@
71847199
}
71857200
},
71867201
"projectFileDependencyGroups": {
7187-
"": [
7202+
"": [],
7203+
".NETCoreApp,Version=v1.0": [
71887204
"Microsoft.DiaSymReader >= 1.0.8-rc2-60325",
71897205
"Microsoft.NETCore.App >= 1.0.0-rc2-3002702",
7190-
"RabbitMQ.Client",
7191-
"dotnet-test-nunit >= 3.3.0.49-CI"
7192-
],
7193-
".NETCoreApp,Version=v1.0": [
71947206
"NUnit >= 3.2.1",
7207+
"RabbitMQ.Client",
71957208
"System.Collections >= 4.0.11-rc2-24027",
71967209
"System.Collections.NonGeneric >= 4.0.1-rc2-24027",
71977210
"System.ComponentModel.EventBasedAsync >= 4.0.11-rc2-24027",
@@ -7204,7 +7217,12 @@
72047217
"System.Xml.ReaderWriter >= 4.0.11-rc2-24027",
72057218
"System.Xml.XDocument >= 4.0.11-rc2-24027",
72067219
"System.Xml.XmlDocument >= 4.0.1-rc2-24027",
7207-
"System.Xml.XmlSerializer >= 4.0.11-rc2-24027"
7220+
"System.Xml.XmlSerializer >= 4.0.11-rc2-24027",
7221+
"dotnet-test-nunit >= 3.3.0.49-CI"
7222+
],
7223+
".NETFramework,Version=v4.5": [
7224+
"NUnit >= 3.2.1",
7225+
"RabbitMQ.Client"
72087226
]
72097227
},
72107228
"tools": {},

projects/client/Unit/src/unit/Fixtures.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,11 @@ protected Process ExecRabbitMQCtl(string args)
413413
}
414414
else if (IsRunningOnMono())
415415
{
416-
rabbitmqctlPath = "../../../../../../rabbit/scripts/rabbitmqctl";
416+
rabbitmqctlPath = "../../../../rabbit/scripts/rabbitmqctl";
417417
}
418418
else
419419
{
420-
rabbitmqctlPath = @"..\..\..\..\..\..\rabbit\scripts\rabbitmqctl.bat";
420+
rabbitmqctlPath = @"..\..\..\..\rabbit\scripts\rabbitmqctl.bat";
421421
}
422422

423423
return ExecCommand(rabbitmqctlPath, args);

0 commit comments

Comments
 (0)