test passing on mac and windows

This commit is contained in:
Tom Gardham-Pallister
2017-01-17 10:20:49 +00:00
parent b873300e82
commit a8878b4a19
11 changed files with 40 additions and 6 deletions

View File

@ -1,8 +1,34 @@
namespace Ocelot.AcceptanceTests
{
using System.Runtime.InteropServices;
public static class TestConfiguration
{
public static double Version => 1.4;
public static string ConfigurationPath => $"./bin/Debug/netcoreapp{Version}/win10-x64/configuration.json";
//public static string Runtime => "win10-x64";
public static string ConfigurationPath => GetConfigurationPath();
public static string GetConfigurationPath()
{
var osArchitecture = RuntimeInformation.OSArchitecture.ToString();
var oSDescription = string.Empty;
if(RuntimeInformation.OSDescription.ToLower().Contains("darwin"))
{
oSDescription = "osx.10.11";
}
if(RuntimeInformation.OSDescription.ToLower().Contains("windows"))
{
oSDescription = "win10";
}
var runTime = $"{oSDescription}-{osArchitecture}".ToLower();
var configPath = $"./bin/Debug/netcoreapp{Version}/{runTime}/configuration.json";
return configPath;
}
}
}

0
test/Ocelot.AcceptanceTests/configuration.json Normal file → Executable file
View File

View File

@ -35,7 +35,8 @@
"TestStack.BDDfy": "4.3.2"
},
"runtimes": {
"win10-x64": {}
"win10-x64": {},
"osx.10.11-x64":{}
},
"frameworks": {
"netcoreapp1.4": {