}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void TestCreateInstance_CaseSensitive ()
{
Hashtable ht = new Hashtable ();
ht.Add ("width", 20);
ht.Add ("Height", 30);
- szconv.CreateInstance (null, ht);
+ Assert.Throws<ArgumentException> (() => szconv.CreateInstance (null, ht));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void ConvertFromInvariantString_string_exc_1 ()
{
- szconv.ConvertFromInvariantString ("1, 2, 3");
+ Assert.Throws<ArgumentException> (() => szconv.ConvertFromInvariantString ("1, 2, 3"));
}
[Test]
}
[Test]
- [ExpectedException (typeof (ArgumentException))]
public void ConvertFromString_string_exc_1 ()
{
CultureInfo culture = CultureInfo.CurrentCulture;
- szconv.ConvertFromString (string.Format(culture,
- "1{0} 2{0} 3{0} 4{0} 5", culture.TextInfo.ListSeparator));
+ Assert.Throws<ArgumentException> (() => szconv.ConvertFromString (string.Format(culture,
+ "1{0} 2{0} 3{0} 4{0} 5", culture.TextInfo.ListSeparator)));
}
[Test]