using NUnit.Framework;
+#if TARGET_JVM
+using System.Globalization;
+using System.Reflection;
+#endif
+
+
namespace MonoTests.System.Net
{
[TestFixture]
}
return new Uri ("file:///" + tempFile);
}
-
+#if TARGET_JVM
+
+ private bool RunningOnUnix {
+ get {
+ Type t = Type.GetType("java.lang.System");
+ MethodInfo mi = t.GetMethod("getProperty", new Type[] { typeof(string) });
+ string osName = (string) mi.Invoke(null, new object[] { "os.name" });
+
+ if(osName == null) {
+ return false;
+ }
+
+ return !osName.StartsWith("win", true, CultureInfo.InvariantCulture);
+ }
+ }
+
+#else
private bool RunningOnUnix {
get {
// check for Unix platforms - see FAQ for more details
return ((platform == 4) || (platform == 128));
}
}
+#endif
}
}