From cf6d7f9a56db735f1e5f07f863a1b07b0463b30b Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Mon, 8 Feb 2016 11:08:49 -0800 Subject: [PATCH] Enabled tests to run in dotnet xunit runner --- makefile.shade | 7 ------ .../WebHostBuilderTests.cs | 4 +++- .../project.json | 22 +++++++++---------- .../project.json | 22 +++++++++---------- 4 files changed, 23 insertions(+), 32 deletions(-) delete mode 100644 makefile.shade diff --git a/makefile.shade b/makefile.shade deleted file mode 100644 index 562494d144..0000000000 --- a/makefile.shade +++ /dev/null @@ -1,7 +0,0 @@ - -var VERSION='0.1' -var FULL_VERSION='0.1' -var AUTHORS='Microsoft Open Technologies, Inc.' - -use-standard-lifecycle -k-standard-goals diff --git a/test/Microsoft.AspNetCore.Hosting.Tests/WebHostBuilderTests.cs b/test/Microsoft.AspNetCore.Hosting.Tests/WebHostBuilderTests.cs index 9e9f7a351c..365ebccec3 100644 --- a/test/Microsoft.AspNetCore.Hosting.Tests/WebHostBuilderTests.cs +++ b/test/Microsoft.AspNetCore.Hosting.Tests/WebHostBuilderTests.cs @@ -314,7 +314,9 @@ namespace Microsoft.AspNetCore.Hosting .UseStartup("Microsoft.AspNetCore.Hosting.Tests") .Build(); - Assert.Equal(Path.GetFullPath("bar"), host.Services.GetService().ApplicationBasePath); + var basePath = host.Services.GetRequiredService().ApplicationBasePath; + Assert.True(Path.IsPathRooted(basePath)); + Assert.EndsWith(Path.DirectorySeparatorChar + "bar", basePath); } private IWebHostBuilder CreateWebHostBuilder() diff --git a/test/Microsoft.AspNetCore.Hosting.Tests/project.json b/test/Microsoft.AspNetCore.Hosting.Tests/project.json index 17a1672d38..04ba35aef9 100644 --- a/test/Microsoft.AspNetCore.Hosting.Tests/project.json +++ b/test/Microsoft.AspNetCore.Hosting.Tests/project.json @@ -4,7 +4,7 @@ "keyFile": "../../tools/Key.snk" }, "content": [ - "testroot/**/*" + "testroot/**/*" ], "dependencies": { "Microsoft.AspNetCore.Hosting": "1.0.0-*", @@ -16,24 +16,22 @@ "xunit": "2.1.0" }, "frameworks": { + "dnxcore50": { + "dependencies": { + "dotnet-test-xunit": "1.0.0-dev-*" + }, + "imports": "portable-net451+win8" + }, "dnx451": { "frameworkAssemblies": { "System.Threading.Tasks": "" }, "dependencies": { + "System.Threading.Tasks": "4.0.11-*", "xunit.runner.console": "2.1.0" } - }, - "dnxcore50": { - "dependencies": { - "xunit.runner.aspnet": "2.0.0-aspnet-*" - }, - "imports": "portable-net451+win8" } }, - "testRunner": "xunit", - "commands": { - "test": "xunit.runner.aspnet" - } -} + "testRunner": "xunit" +} \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.TestHost.Tests/project.json b/test/Microsoft.AspNetCore.TestHost.Tests/project.json index 52747457b9..b9a751df45 100644 --- a/test/Microsoft.AspNetCore.TestHost.Tests/project.json +++ b/test/Microsoft.AspNetCore.TestHost.Tests/project.json @@ -4,31 +4,29 @@ "keyFile": "../../tools/Key.snk" }, "dependencies": { - "Microsoft.AspNetCore.Testing": "1.0.0-*", "Microsoft.AspNetCore.TestHost": "1.0.0-*", + "Microsoft.AspNetCore.Testing": "1.0.0-*", "Microsoft.Extensions.DiagnosticAdapter": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*", "xunit": "2.1.0" }, "frameworks": { + "dnxcore50": { + "dependencies": { + "dotnet-test-xunit": "1.0.0-dev-*" + }, + "imports": "portable-net451+win8" + }, "dnx451": { "frameworkAssemblies": { "System.Threading.Tasks": "" }, "dependencies": { + "System.Threading.Tasks": "4.0.11-*", "xunit.runner.console": "2.1.0" } - }, - "dnxcore50": { - "dependencies": { - "xunit.runner.aspnet": "2.0.0-aspnet-*" - }, - "imports": "portable-net451+win8" } }, - "testRunner": "xunit", - "commands": { - "test": "xunit.runner.aspnet" - } -} + "testRunner": "xunit" +} \ No newline at end of file