mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-01 06:15:27 +08:00 
			
		
		
		
	Merge pull request #53 from TomPallister/feature/remove-test-configuration-nonsense
removed test configuration nonsense
This commit is contained in:
		| @@ -1,36 +1,10 @@ | ||||
| namespace Ocelot.AcceptanceTests | ||||
| { | ||||
|     using System.Runtime.InteropServices; | ||||
| using System; | ||||
| using System.IO; | ||||
|  | ||||
| namespace Ocelot.AcceptanceTests | ||||
| { | ||||
|     public static class TestConfiguration | ||||
|     { | ||||
|         public static double Version => 1.1; | ||||
|         public static string ConfigurationPath => GetConfigurationPath(); | ||||
|  | ||||
|         public static string GetConfigurationPath() | ||||
|         { | ||||
|             var osArchitecture = RuntimeInformation.OSArchitecture.ToString(); | ||||
|  | ||||
|             if(RuntimeInformation.OSDescription.ToLower().Contains("darwin")) | ||||
|             { | ||||
|                 return FormatConfigurationPath("osx.10.11", osArchitecture); | ||||
|             } | ||||
|  | ||||
|             if(RuntimeInformation.OSDescription.ToLower().Contains("microsoft windows 10")) | ||||
|             {                 | ||||
|                 return FormatConfigurationPath("win10", osArchitecture); | ||||
|             } | ||||
|              | ||||
|             return FormatConfigurationPath("win7", osArchitecture); | ||||
|         } | ||||
|  | ||||
|         private static string FormatConfigurationPath(string oSDescription, string osArchitecture) | ||||
|         { | ||||
|             var runTime = $"{oSDescription}-{osArchitecture}".ToLower(); | ||||
|  | ||||
|             var configPath = $"./bin/Debug/netcoreapp{Version}/{runTime}/configuration.json"; | ||||
|  | ||||
|             return configPath; | ||||
|         } | ||||
|         public static string ConfigurationPath => Path.Combine(AppContext.BaseDirectory, "configuration.json"); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tom Pallister
					Tom Pallister