}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (ptconv.CanConvertFrom (typeof (String)), "CCF#1");
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Assert.AreEqual (pt, (Point) ptconv.ConvertFrom (null, CultureInfo.InvariantCulture,
} catch (Exception e) {
Assert.IsTrue (e is NotSupportedException, "CT#7");
}
+
+ try {
+ // culture == null
+ ptconv.ConvertTo (null, null, pt, typeof (string));
+ } catch (NullReferenceException e) {
+ Assert.Fail ("CT#8: must not throw NullReferenceException");
+ }
}
[Test]
}
[Test]
-#if NET_2_0
- [ExpectedException (typeof (ArgumentException))]
-#else
- [ExpectedException (typeof (NullReferenceException))]
-#endif
public void TestCreateInstance_CaseSensitive ()
{
Hashtable ht = new Hashtable ();
ht.Add ("x", 2);
ht.Add ("Y", 3);
- ptconv.CreateInstance (null, ht);
+ Assert.Throws<ArgumentException> (() => ptconv.CreateInstance (null, ht));
}
[Test]
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
Attribute [] attrs;
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void ConvertFromInvariantString_string_exc_1 ()
{
- ptconv.ConvertFromInvariantString ("1");
+ Assert.Throws<ArgumentException> (() => ptconv.ConvertFromInvariantString ("1"));
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_string_exc_2 ()
{
try {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string ()
{
// save current culture
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void ConvertFromString_string_exc_1 ()
{
- ptconv.ConvertFromString ("1");
+ Assert.Throws<ArgumentException> (() => ptconv.ConvertFromString ("1"));
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string_exc_2 ()
{
try {