Update of /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util
In directory sc8-pr-cvs1:/tmp/cvs-serv2557/src/NetReflector.Test/Util
Modified Files:
ReflectorMemberTest.cs
Log Message:
setting a reflector property that throws an exception now correctly exposes the thrown exception (unwraps it from a TargetInvocationException)
Index: ReflectorMemberTest.cs
===================================================================
RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector.Test/Util/ReflectorMemberTest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ReflectorMemberTest.cs 5 Nov 2003 08:29:56 -0000 1.1
--- ReflectorMemberTest.cs 21 Jan 2004 09:42:48 -0000 1.2
***************
*** 59,63 ****
}
! [Test]
public void ProcessPublicFieldAsReflectorMember()
{
--- 59,79 ----
}
! [Test, ExpectedException(typeof(ArgumentException))]
! public void SettingValueThrowsException()
! {
! ReflectorMember member = ReflectorMember.Create(typeof(ExceptionTestClass).GetProperty("ExceptionProperty"));
! ExceptionTestClass testClass = new ExceptionTestClass();
! member.SetValue(testClass, null);
! }
!
! class ExceptionTestClass : TestClass
! {
! public string ExceptionProperty
! {
! set { throw new ArgumentException("always throws an exception"); }
! }
! }
!
! [Test, Ignore("test is commented out. investigate if still needed")]
public void ProcessPublicFieldAsReflectorMember()
{
|