public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Int32Rect.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Point.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Rect.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Size.Parse (value);
}
public override object ConvertFromString (string value, IValueSerializerContext context)
{
if (value == null)
- throw new ArgumentNullException ("value");
+ throw new NotSupportedException ("value != null");
return Vector.Parse (value);
}
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new Int32RectValueSerializer ();
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new PointValueSerializer ();
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new RectValueSerializer ();
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new SizeValueSerializer ();
}
[Test]
- [ExpectedException (typeof (ArgumentNullException))]
+ [ExpectedException (typeof (NotSupportedException))]
public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
{
var serializer = new VectorValueSerializer ();