+2007-01-31 Ilya Kharmatsky <ilyak -at- mainsoft.com>
+
+ * IPAddressTest.cs, WebProxyTest.cs, WebHeaderCollectionTest.cs,
+ ServicePointManagerTest.cs, ServicePointTest.cs:
+ Excluded not working in Grasshopper tests, under 'TARGET_JVM'
+ directive
+ * HttpListenerPrefixCollectionTest.cs, HttpListenerTest.cs,
+ HttpListenerBasicIdentityTest.cs, HttpListener2Test.cs:
+ Excluded entire test fixture, since HttpListener still not
+ implemented in Grasshopper.
+ * FileWebRequestTest.cs, FileWebResponseTest.cs:
+ Excluded not working in Grasshopper tests and provided different
+ implementation of helper methods - under 'TARGET_JVM'
+
2007-01-30 Atsushi Enomoto <atsushi@ximian.com>
* HttpWebRequestTest.cs : use correct attribute.
using NUnit.Framework;
+#if TARGET_JVM
+using System.Globalization;
+using System.Reflection;
+#endif
+
namespace MonoTests.System.Net
{
[TestFixture]
}
[Test]
+#if TARGET_JVM
+ [Ignore ("Bug in resource releasing - cannot delete file")]
+#endif
public void Async ()
{
WebResponse res = null;
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7205")]
- [Category ("NotWorking")]
-#endif
public void Sync ()
{
WebResponse res = null;
}
[Test]
+#if TARGET_JVM
+ //FIXME: include Java serialization compliant tests
+ [Ignore ("The MS compliant binary serialization is not supported")]
+#endif
public void GetObjectData ()
{
FileWebRequest fwr = (FileWebRequest) WebRequest.Create ("file:///test.txt");
}
[Test]
+#if TARGET_JVM
+ [Ignore ("The MS compliant binary serialization is not supported")]
+#endif
public void Deserialize ()
{
MemoryStream ms = new MemoryStream ();
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
private static readonly byte [] _serialized = new byte [] {
#if NET_2_0
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
}
}
// ***************************************************************************************
namespace MonoTests.System.Net {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class HttpListener is not supported")]
+#endif
public class HttpListener2Test {
public class MyNetworkStream : NetworkStream {
public MyNetworkStream (Socket sock) : base (sock, true)
namespace MonoTests.System.Net {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class HttpListenerBasicIdentity - is not supported")]
+#endif
public class HttpListenerBasicIdentityTest {
[Test]
[ExpectedException (typeof (ArgumentNullException))]
namespace MonoTests.System.Net {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class System.Net.HttpListenerPrefixCollection - is not supported")]
+#endif
public class HttpListenerPrefixCollectionTest {
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
namespace MonoTests.System.Net {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class HttpListener is not implemented")]
+#endif
public class HttpListenerTest {
[Test]
public void DefaultProperties ()
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD BUG ID: 7213")]
+#endif
public void Constructor1_Address_4Byte ()
{
byte [] bytes = new byte [4] { 192, 202, 112, 37 };
\r
[Test, ExpectedException (typeof (InvalidOperationException))]\r
[Category ("InetAccess")]\r
+#if TARGET_JVM\r
+ [Ignore ("Unsupported property - ServicePointManager.MaxServicePoints")]\r
+#endif\r
public void MaxServicePointManagers ()\r
{\r
AssertEquals ("#1", 0, ServicePointManager.MaxServicePoints);\r
\r
[Test]\r
[Category ("InetAccess")]\r
+#if TARGET_JVM\r
+ [Ignore ("Unsupported - ServicePointManager.FindServicePoint")]\r
+#endif\r
public void All ()\r
{\r
ServicePoint p = ServicePointManager.FindServicePoint (new Uri ("mailto:xx@yyy.com"));\r
\r
[Test]\r
[Category ("InetAccess")]\r
+#if TARGET_JVM\r
+ [Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]\r
+#endif \r
public void ConnectionLimit ()\r
{ \r
// the default is already 2, just in case it isn't..\r
}
[Test]
+#if TARGET_JVM
+ //FIXME: include Java serialization compliant tests - the order of object
+ // in SerializationInfo should stay same to MS format...
+ [Ignore ("The MS compliant binary serialization is not supported")]
+#endif
public void GetObjectData ()
{
SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),
}
[Test]
+#if TARGET_JVM
+ //FIXME: include Java serialization compliant tests
+ [Ignore ("The MS compliant binary serialization is not supported")]
+#endif
public void Serialize ()
{
WebHeaderCollection headers = new WebHeaderCollection ();
}
[Test]
+#if TARGET_JVM
+ //FIXME: include Java serialization compliant tests
+ [Ignore ("The MS compliant binary serialization format is not supported")]
+#endif
public void Deserialize ()
{
MemoryStream ms = new MemoryStream ();
}
[Test]
+#if TARGET_JVM
+ [Ignore ("TD BUG ID: 7213")]
+#endif
public void IsByPassed_Host_Null ()
{
WebProxy p = new WebProxy ("http://proxy.contoso.com", true);
[Test]
+#if TARGET_JVM
+ [Ignore ("The MS compliant binary serialization is not supported")]
+#endif
public void GetObjectData ()
{
SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),