Skipped tests using file paths not supported on Mono
This commit is contained in:
parent
12d9302a31
commit
5cb8ad3d87
|
|
@ -15,14 +15,32 @@ using Microsoft.Framework.Caching;
|
||||||
using Microsoft.Framework.Logging;
|
using Microsoft.Framework.Logging;
|
||||||
using Microsoft.Dnx.Runtime;
|
using Microsoft.Dnx.Runtime;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
using Microsoft.AspNet.Testing;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Diagnostics
|
namespace Microsoft.AspNet.Diagnostics
|
||||||
{
|
{
|
||||||
public class ErrorPageMiddlewareTest
|
public class ErrorPageMiddlewareTest
|
||||||
{
|
{
|
||||||
|
public static TheoryData RelativePathsData
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var data = new TheoryData<string>
|
||||||
|
{
|
||||||
|
"TestFiles/SourceFile.txt"
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!TestPlatformHelper.IsMono)
|
||||||
|
{
|
||||||
|
data.Add(@"TestFiles\SourceFile.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("TestFiles/SourceFile.txt")]
|
[MemberData(nameof(RelativePathsData))]
|
||||||
[InlineData(@"TestFiles\SourceFile.txt")]
|
|
||||||
public void UsesDefaultFileProvider_IfNotProvidedOnOptions(string relativePath)
|
public void UsesDefaultFileProvider_IfNotProvidedOnOptions(string relativePath)
|
||||||
{
|
{
|
||||||
// Arrange & Act
|
// Arrange & Act
|
||||||
|
|
@ -42,11 +60,18 @@ namespace Microsoft.AspNet.Diagnostics
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
var rootPath = Directory.GetCurrentDirectory();
|
var rootPath = Directory.GetCurrentDirectory();
|
||||||
return new TheoryData<string>()
|
|
||||||
|
var data = new TheoryData<string>()
|
||||||
{
|
{
|
||||||
Path.Combine(rootPath, "TestFiles/SourceFile.txt"),
|
Path.Combine(rootPath, "TestFiles/SourceFile.txt")
|
||||||
Path.Combine(rootPath, @"TestFiles\SourceFile.txt")
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!TestPlatformHelper.IsMono)
|
||||||
|
{
|
||||||
|
Path.Combine(rootPath, @"TestFiles\SourceFile.txt");
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,8 +97,7 @@ namespace Microsoft.AspNet.Diagnostics
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("TestFiles/SourceFile.txt")]
|
[MemberData(nameof(RelativePathsData))]
|
||||||
[InlineData(@"TestFiles\SourceFile.txt")]
|
|
||||||
public void DisplaysSourceCodeLines_ForRelativePaths(string relativePath)
|
public void DisplaysSourceCodeLines_ForRelativePaths(string relativePath)
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"Microsoft.AspNet.Diagnostics.Elm": "1.0.0-*",
|
"Microsoft.AspNet.Diagnostics.Elm": "1.0.0-*",
|
||||||
"Microsoft.AspNet.FileProviders.Embedded": "1.0.0-*",
|
"Microsoft.AspNet.FileProviders.Embedded": "1.0.0-*",
|
||||||
"Microsoft.AspNet.TestHost": "1.0.0-*",
|
"Microsoft.AspNet.TestHost": "1.0.0-*",
|
||||||
|
"Microsoft.AspNet.Testing": "1.0.0-*",
|
||||||
"Microsoft.Framework.DependencyInjection": "1.0.0-*",
|
"Microsoft.Framework.DependencyInjection": "1.0.0-*",
|
||||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue