Updating test TFMs for custom test discovery
This commit is contained in:
Родитель
9b0afe0d1b
Коммит
497565a52c
|
@ -115,7 +115,7 @@ namespace Microsoft.AspNetCore.Server.WebListener
|
|||
private async Task<string> SendRequestAsync(string uri,
|
||||
X509Certificate cert = null)
|
||||
{
|
||||
#if DNX451
|
||||
#if NET451
|
||||
var handler = new WebRequestHandler();
|
||||
#else
|
||||
var handler = new WinHttpHandler();
|
||||
|
@ -133,7 +133,7 @@ namespace Microsoft.AspNetCore.Server.WebListener
|
|||
|
||||
private async Task<string> SendRequestAsync(string uri, string upload)
|
||||
{
|
||||
#if DNX451
|
||||
#if NET451
|
||||
var handler = new WebRequestHandler();
|
||||
#else
|
||||
var handler = new WinHttpHandler();
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace Microsoft.AspNetCore.Server.WebListener
|
|||
{
|
||||
httpContext.Response.Headers["Content-lenGth"] = " 30 ";
|
||||
Stream stream = httpContext.Response.Body;
|
||||
#if DNX451
|
||||
#if NET451
|
||||
stream.EndWrite(stream.BeginWrite(new byte[10], 0, 10, null, null));
|
||||
#else
|
||||
await stream.WriteAsync(new byte[10], 0, 10);
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
{
|
||||
"testRunner": "xunit",
|
||||
"commands": {
|
||||
"test": "xunit.runner.aspnet"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
|
||||
"Microsoft.AspNetCore.Testing": "1.0.0-*",
|
||||
"Microsoft.NETCore.Platforms": "1.0.1-*"
|
||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||
"xunit": "2.1.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Net.Http.WinHttpHandler": "4.0.0-*",
|
||||
"System.Net.Requests": "4.0.11-*",
|
||||
"System.Net.WebHeaderCollection": "4.0.1-*",
|
||||
"dotnet-test-xunit": "1.0.0-dev-*"
|
||||
},
|
||||
"imports": "portable-net451+win8"
|
||||
},
|
||||
"net451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.Net.Http": "",
|
||||
"System.Net.Http.WebRequest": "",
|
||||
|
@ -18,15 +25,6 @@
|
|||
"dependencies": {
|
||||
"xunit.runner.console": "2.1.0"
|
||||
}
|
||||
},
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Net.Http.WinHttpHandler": "4.0.0-*",
|
||||
"System.Net.Requests": "4.0.11-*",
|
||||
"System.Net.WebHeaderCollection": "4.0.1-*",
|
||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
},
|
||||
"imports": "portable-net451+win8"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Microsoft.Net.Http.Server
|
|||
private async Task<string> SendRequestAsync(string uri,
|
||||
X509Certificate cert = null)
|
||||
{
|
||||
#if DNX451
|
||||
#if NET451
|
||||
WebRequestHandler handler = new WebRequestHandler();
|
||||
#else
|
||||
WinHttpHandler handler = new WinHttpHandler();
|
||||
|
@ -125,7 +125,7 @@ namespace Microsoft.Net.Http.Server
|
|||
|
||||
private async Task<string> SendRequestAsync(string uri, string upload)
|
||||
{
|
||||
#if DNX451
|
||||
#if NET451
|
||||
WebRequestHandler handler = new WebRequestHandler();
|
||||
#else
|
||||
WinHttpHandler handler = new WinHttpHandler();
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Microsoft.Net.Http.Server
|
|||
Assert.Equal("Hello World", response);
|
||||
}
|
||||
}
|
||||
#if DNX451
|
||||
#if NET451
|
||||
[Fact]
|
||||
public async Task RequestBody_ReadBeginEnd_Success()
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace Microsoft.Net.Http.Server
|
|||
var context = await server.GetContextAsync();
|
||||
context.Response.Headers["Content-lenGth"] = " 30 ";
|
||||
Stream stream = context.Response.Body;
|
||||
#if DNX451
|
||||
#if NET451
|
||||
stream.EndWrite(stream.BeginWrite(new byte[10], 0, 10, null, null));
|
||||
#else
|
||||
await stream.WriteAsync(new byte[10], 0, 10);
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Microsoft.Net.Http.Server
|
|||
{
|
||||
try
|
||||
{
|
||||
#if DNX451
|
||||
#if NET451
|
||||
return !string.IsNullOrEmpty(System.DirectoryServices.ActiveDirectory.Domain.GetComputerDomain().Name);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,35 +1,34 @@
|
|||
{
|
||||
"testRunner": "xunit",
|
||||
"commands": {
|
||||
"test": "xunit.runner.aspnet"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.Net.Http.Server": "0.1.0-*",
|
||||
"Microsoft.Net.WebSockets.Server": "0.1.0-*",
|
||||
"Microsoft.AspNetCore.Testing": "1.0.0-*",
|
||||
"Microsoft.NETCore.Platforms": "1.0.1-*",
|
||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
"xunit": "2.1.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.DirectoryServices": "",
|
||||
"System.Net.Http": "",
|
||||
"System.Net.Http.WebRequest": ""
|
||||
},
|
||||
"dependencies": {
|
||||
"xunit.runner.console": "2.1.0"
|
||||
}
|
||||
},
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Net.Http": "4.0.1-*",
|
||||
"System.Net.Http.WinHttpHandler": "4.0.0-*",
|
||||
"System.Net.Requests": "4.0.11-*",
|
||||
"System.Net.WebSockets.Client": "4.0.0-*",
|
||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
"dotnet-test-xunit": "1.0.0-dev-*"
|
||||
},
|
||||
"imports": "portable-net451+win8"
|
||||
},
|
||||
"net451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.DirectoryServices": "",
|
||||
"System.Net.Http": "",
|
||||
"System.Net.Http.WebRequest": "",
|
||||
"System.Runtime": "",
|
||||
"System.Threading.Tasks": ""
|
||||
},
|
||||
"dependencies": {
|
||||
"xunit.runner.console": "2.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче