[Mono-bugs] [Bug 73007][Nor] Changed - Mono throws exception unexpectedly when using NUnit.Mocks in some cases
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 4 Mar 2005 12:12:24 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vargaz@gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=73007
--- shadow/73007 2005-02-25 14:17:36.000000000 -0500
+++ shadow/73007.tmp.12023 2005-03-04 12:12:24.000000000 -0500
@@ -99,6 +99,48 @@
1.0.5 or Mono 1.1.4+.
------- Additional Comments From jrodman@ximian-bugzilla.spamportal.net 2005-02-25 02:44 -------
Created an attachment (id=14403)
Test case
+
+------- Additional Comments From vargaz@gmail.com 2005-03-04 12:12 -------
+Reduced testcase:
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Runtime.Remoting.Proxies;
+using System.Runtime.Remoting.Messaging;
+
+public class AnulledExitTests
+{
+ class RealObject : MarshalByRefObject
+ {
+ public object otherobj;
+ }
+
+ public static void Main ()
+ {
+ MockInterfaceHandler2 handler = new MockInterfaceHandler2( typeof
+(RealObject) );
+ RealObject o = (RealObject)handler.GetTransparentProxy();
+
+ Console.WriteLine (o.otherobj);
+ }
+}
+
+public class MockInterfaceHandler2 : RealProxy
+{
+ public MockInterfaceHandler2( Type type ) : base( type )
+ {
+ }
+
+ public override IMessage Invoke( IMessage msg )
+ {
+ IMethodCallMessage call = (IMethodCallMessage)msg;
+
+ Console.WriteLine (call);
+ return new ReturnMessage( null, null, 0, null, call );
+ }
+}
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<