* BaseCalls.cs: Create 3 test remote objects, one for each kind of access,
authorLluis Sanchez <lluis@novell.com>
Fri, 22 Aug 2003 12:39:02 +0000 (12:39 -0000)
committerLluis Sanchez <lluis@novell.com>
Fri, 22 Aug 2003 12:39:02 +0000 (12:39 -0000)
  to avoid reuse of client proxies.
* CallSeq.cs: Now, "domain ID" is set manually.
* ContextsTest.cs: Added initialization of common domain id. Other small fixes.
* ReflectionCalls.cs: Get the method for the invoke for the correct type.
  GetType() for a proxy to interface always return MarshalByRefObject.
* TcpCalls.cs, HttpCalls.cs: Added delegate tests.
* DelegateCalls.cs: New test suite for calls using delegates.

svn path=/trunk/mcs/; revision=17507

mcs/class/System.Runtime.Remoting/Test/BaseCalls.cs
mcs/class/System.Runtime.Remoting/Test/CallSeq.cs
mcs/class/System.Runtime.Remoting/Test/ChangeLog
mcs/class/System.Runtime.Remoting/Test/ContextHookAttribute.cs
mcs/class/System.Runtime.Remoting/Test/ContextsTest.cs
mcs/class/System.Runtime.Remoting/Test/DelegateCalls.cs [new file with mode: 0644]
mcs/class/System.Runtime.Remoting/Test/HttpCalls.cs
mcs/class/System.Runtime.Remoting/Test/ReflectionCalls.cs
mcs/class/System.Runtime.Remoting/Test/TcpCalls.cs

index 1fed70cffa66ebb083e38d0a819d73201559fc53..790c71ae9f7b03bced43782f03c87e5019db6b3e 100644 (file)
@@ -23,7 +23,7 @@ namespace MonoTests.System.Runtime.Remoting
        public abstract class BaseCallTest : Assertion
        {
                IChannelSender chs;
-               string remoteUri;
+               string[] remoteUris;
                CallsDomainServer server;
                int remoteDomId;
 
@@ -47,29 +47,30 @@ namespace MonoTests.System.Runtime.Remoting
 
                        AppDomain domain = AppDomain.CreateDomain ("testdomain");
                        server = (CallsDomainServer) domain.CreateInstanceAndUnwrap(GetType().Assembly.FullName,"MonoTests.System.Runtime.Remoting.CallsDomainServer");
-                       remoteUri = server.Start (cm);
+                       remoteUris = server.Start (cm);
                        return server.GetDomId ();
                }
                
                protected virtual void ShutdownServer ()
                {
                        server.Stop ();
-                       ChannelServices.UnregisterChannel (chs);
+                       if (chs != null)
+                               ChannelServices.UnregisterChannel (chs);
                }
 
                protected virtual RemoteObject CreateRemoteInstance ()
                {
-                       return (RemoteObject) Activator.GetObject (typeof(RemoteObject), remoteUri);
+                       return (RemoteObject) Activator.GetObject (typeof(RemoteObject), remoteUris[0]);
                }
 
                protected virtual AbstractRemoteObject CreateRemoteAbstract ()
                {
-                       return (AbstractRemoteObject) Activator.GetObject (typeof(AbstractRemoteObject), remoteUri);
+                       return (AbstractRemoteObject) Activator.GetObject (typeof(AbstractRemoteObject), remoteUris[1]);
                }
 
                protected virtual IRemoteObject CreateRemoteInterface ()
                {
-                       return (IRemoteObject) Activator.GetObject (typeof(IRemoteObject), remoteUri);
+                       return (IRemoteObject) Activator.GetObject (typeof(IRemoteObject), remoteUris[2]);
                }
 
                public InstanceSurrogate InternalGetInstanceSurrogate ()
@@ -287,14 +288,20 @@ namespace MonoTests.System.Runtime.Remoting
        {
                IChannelReceiver ch;
 
-               public string Start(ChannelManager cm)
+               public string[] Start(ChannelManager cm)
                {
                        try
                        {
                                ch = cm.CreateServerChannel ();
                                ChannelServices.RegisterChannel ((IChannel)ch);
-                               RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test", WellKnownObjectMode.SingleCall);
-                               return ch.GetUrlsForUri ("test")[0];
+                               RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test1", WellKnownObjectMode.SingleCall);
+                               RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test2", WellKnownObjectMode.SingleCall);
+                               RemotingConfiguration.RegisterWellKnownServiceType (typeof (RemoteObject), "test3", WellKnownObjectMode.SingleCall);
+                               string[] uris = new string[3];
+                               uris[0] = ch.GetUrlsForUri ("test1")[0];
+                               uris[1] = ch.GetUrlsForUri ("test2")[0];
+                               uris[2] = ch.GetUrlsForUri ("test3")[0];
+                               return uris;
                        }
                        catch (Exception ex)
                        {
@@ -305,7 +312,8 @@ namespace MonoTests.System.Runtime.Remoting
 
                public void Stop ()
                {
-                       ChannelServices.UnregisterChannel (ch);
+                       if (ch != null)
+                               ChannelServices.UnregisterChannel (ch);
                }
 
                public int GetDomId ()
index 881f799d334fa9e9d551f40b15a0f7ac3eb07c15..32210d7c752108eeb056b945466b8c96e08fc64b 100644 (file)
@@ -20,6 +20,7 @@ namespace MonoTests.System.Runtime.Remoting
                static int writePos = 0;\r
                static string name = "";\r
                static ArrayList contexts = new ArrayList ();\r
+               static int domId = 1;\r
 \r
                public static void Add (string msg)\r
                {\r
@@ -46,11 +47,8 @@ namespace MonoTests.System.Runtime.Remoting
 \r
                public static int CommonDomainId\r
                {\r
-                       get\r
-                       {\r
-                               if (Thread.GetDomainID() != 1) return 2;\r
-                               else return 1;\r
-                       }\r
+                       get { return domId; }\r
+                       set { domId = value; }\r
                }\r
 \r
                public static void Init (string str)\r
index d688e535361cd03ad357b70b6429b5afd20579ef..7af5e39fec571f11db7239a22d45d4590506ecb6 100644 (file)
@@ -1,4 +1,15 @@
-2003-07-23  Lluis Sanchez Gual <lluis@ximian.com>
+2003-08-22  Lluis Sanchez Gual <lluis@ximian.com>
+
+       * BaseCalls.cs: Create 3 test remote objects, one for each kind of access,
+         to avoid reuse of client proxies.
+       * CallSeq.cs: Now, "domain ID" is set manually.
+       * ContextsTest.cs: Added initialization of common domain id. Other small fixes.
+       * ReflectionCalls.cs: Get the method for the invoke for the correct type.
+         GetType() for a proxy to interface always return MarshalByRefObject.
+       * TcpCalls.cs, HttpCalls.cs: Added delegate tests.
+       * DelegateCalls.cs: New test suite for calls using delegates.
+
+2003-08-20  Lluis Sanchez Gual <lluis@ximian.com>
 
        * AsyncCalls.cs, BaseCalls.cs, HttpCalls.cs, ReflectionCalls.cs, SyncCalls.cs,
          TcpCalls.cs: new test suite for remoting. It tests sync calls, async calls
index 093862f493173012d57c171a999f634de86c19be..df5f4dcd154ff901d8b269c8f08c1202e6f9b50d 100644 (file)
@@ -36,6 +36,7 @@ namespace MonoTests.System.Runtime.Remoting
 \r
                public override object TypeId\r
                {\r
+\r
                        get { return "ContextHook"; }\r
                }\r
 \r
index c5dd5eeeff9bab64d268ffe1dfecdde858ca3632..aabe7f28e63ab9a8726009992dba75ec5032eeb9 100644 (file)
@@ -28,6 +28,7 @@ namespace MonoTests.System.Runtime.Remoting
                [TestFixtureSetUp]\r
                public void Run()\r
                {\r
+                       CallSeq.CommonDomainId = 1;\r
                        Context.RegisterDynamicProperty (new DynProperty("global"), null, null);\r
 \r
                        ch = new TcpChannel(0);\r
@@ -38,7 +39,8 @@ namespace MonoTests.System.Runtime.Remoting
                public void End ()\r
                {\r
                        Context.UnregisterDynamicProperty ("global", null, null);\r
-                       ChannelServices.UnregisterChannel (ch);\r
+                       if (ch != null)\r
+                               ChannelServices.UnregisterChannel (ch);\r
                }\r
 \r
                [Test]\r
@@ -57,6 +59,8 @@ namespace MonoTests.System.Runtime.Remoting
                [Test]\r
                public void TestNewContext ()\r
                {\r
+                       try\r
+                       {\r
                        CallSeq.Init("TestNewContext");\r
                        CallSeq.Add (">> TestNewContext");\r
                        object[] at = new object[] { new ContextHookAttribute ("1",true)};\r
@@ -66,36 +70,43 @@ namespace MonoTests.System.Runtime.Remoting
                        RunTestObject (list);\r
                        CallSeq.Add ("<< TestNewContext");\r
                        CallSeq.Check (Checks.seqNewContext,1);\r
+                       }\r
+                       catch (Exception eX)\r
+                       {\r
+                               Console.WriteLine (eX);\r
+                       }\r
                }\r
 \r
                [Test]\r
                public void TestRemoteContext ()\r
                {\r
-                       try\r
-                       {\r
                        AppDomain domain = AppDomain.CreateDomain ("test");\r
                        DomainServer server = (DomainServer) domain.CreateInstanceAndUnwrap(GetType().Assembly.FullName,"MonoTests.System.Runtime.Remoting.DomainServer");\r
+                       try\r
+                       {\r
+                               CallSeq.Init("TestRemoteContext");\r
+                               CallSeq.Add (">> TestRemoteContext");\r
+                               object[] at = new object[] { new ContextHookAttribute ("1",true), new UrlAttribute ("tcp://localhost:1122")};\r
+                               CallSeq.Add (">> Creating instance");\r
+                               ServerList list = (ServerList) Activator.CreateInstance (typeof (ServerList),null,at);\r
+                               CallSeq.Add ("<< Creating instance");\r
+                               RunTestObject (list);\r
+                               CallSeq.Add ("<< TestRemoteContext");\r
+                               CallSeq.Check (Checks.seqRemoteContext,1);\r
 \r
-                       CallSeq.Init("TestRemoteContext");\r
-                       CallSeq.Add (">> TestRemoteContext");\r
-                       object[] at = new object[] { new ContextHookAttribute ("1",true), new UrlAttribute ("tcp://localhost:1122")};\r
-                       CallSeq.Add (">> Creating instance");\r
-                       ServerList list = (ServerList) Activator.CreateInstance (typeof (ServerList),null,at);\r
-                       CallSeq.Add ("<< Creating instance");\r
-                       RunTestObject (list);\r
-                       CallSeq.Add ("<< TestRemoteContext");\r
-                       CallSeq.Check (Checks.seqRemoteContext,1);\r
-\r
-                       CallSeq.Init ("TestRemoteContext Server");\r
-                       CallSeq.Seq = server.GetRemoteSeq ();\r
-                       CallSeq.Check (Checks.seqRemoteContext,2);\r
-                       server.Stop ();\r
+                               CallSeq.Init ("TestRemoteContext Server");\r
+                               CallSeq.Seq = server.GetRemoteSeq ();\r
+                               CallSeq.Check (Checks.seqRemoteContext,2);\r
                        }\r
                        catch (Exception ex)\r
                        {\r
                                Console.WriteLine (ex);\r
                                throw ex;\r
                        }\r
+                       finally\r
+                       {\r
+                               server.Stop ();\r
+                       }\r
 //                     AppDomain.Unload (domain);\r
                }\r
 \r
@@ -179,7 +190,7 @@ namespace MonoTests.System.Runtime.Remoting
                        }\r
                        catch (Exception ex)\r
                        {\r
-                               Console.WriteLine (ex.ToString());\r
+                       //      Console.WriteLine (ex.ToString());\r
                                throw;\r
                        }\r
                }\r
@@ -190,7 +201,8 @@ namespace MonoTests.System.Runtime.Remoting
                TcpChannel ch;\r
                \r
                public DomainServer()\r
-               {                       \r
+               {\r
+                       CallSeq.CommonDomainId = 2;\r
                        try\r
                        {\r
                                ch = new TcpChannel(1122);\r
@@ -213,7 +225,8 @@ namespace MonoTests.System.Runtime.Remoting
 \r
                public void Stop ()\r
                {\r
-                       ChannelServices.UnregisterChannel (ch);\r
+                       if (ch != null)\r
+                               ChannelServices.UnregisterChannel (ch);\r
                }\r
        }\r
 \r
@@ -618,6 +631,7 @@ namespace MonoTests.System.Runtime.Remoting
                                "339 (d1,c1) <-> global DynamicSink Finish ProcessItems client:False",\r
                                "340 (d1,c0) <-> global DynamicSink Finish ProcessItems client:True",\r
                                "341 (d1,c0) <-> defcontext DynamicSink Finish ProcessItems client:True",\r
+\r
                                "342 (d1,c0) <-- EnvoySink(1.d1) SyncProcessMessage ProcessItems",\r
                                "343 (d1,c0) <-- EnvoySink(x.d1) SyncProcessMessage ProcessItems",\r
                                "344 (d1,c0) <-> proxy DynamicSink Finish ProcessItems client:True",\r
@@ -732,6 +746,7 @@ namespace MonoTests.System.Runtime.Remoting
                                "034 (d1,c0) <-> defcontext DynamicSink Finish FieldSetter client:True",\r
                                "035 (d1,c0) <-- EnvoySink(1.d1) SyncProcessMessage FieldSetter",\r
                                "036 (d1,c0) <-- EnvoySink(x.d1) SyncProcessMessage FieldSetter",\r
+\r
                                "037 (d1,c0) <-- EnvoySink(x.d2) SyncProcessMessage FieldSetter",\r
 \r
                                "038 (d1,c0) <-> proxy DynamicSink Finish FieldSetter client:True",\r
diff --git a/mcs/class/System.Runtime.Remoting/Test/DelegateCalls.cs b/mcs/class/System.Runtime.Remoting/Test/DelegateCalls.cs
new file mode 100644 (file)
index 0000000..7655ea9
--- /dev/null
@@ -0,0 +1,120 @@
+//
+// MonoTests.System.Runtime.Remoting.DelegateCalls.cs
+//
+// Author: Lluis Sanchez Gual (lluis@ximian.com)
+//
+// 2003 (C) Copyright, Ximian, Inc.
+//
+
+using System;
+using System.Collections;
+using NUnit.Framework;
+
+namespace MonoTests.System.Runtime.Remoting
+{
+       public abstract class DelegateCallTest : BaseCallTest
+       {
+               public override InstanceSurrogate GetInstanceSurrogate () { return new DelegateInstanceSurrogate (); }
+               public override AbstractSurrogate GetAbstractSurrogate () { return new DelegateAbstractSurrogate (); }
+               public override InterfaceSurrogate GetInterfaceSurrogate () { return new DelegateInterfaceSurrogate (); }
+       }
+
+       public class DelegateInstanceSurrogate : InstanceSurrogate
+       {
+               public override int Simple ()
+               {
+                       DelegateSimple de = new DelegateSimple (RemoteObject.Simple);
+                       return de ();
+               }
+
+               public override string PrimitiveParams (int a, uint b, char c, string d)
+               {
+                       DelegatePrimitiveParams de = new DelegatePrimitiveParams (RemoteObject.PrimitiveParams);
+                       return de (a,b,c,d);
+               }
+
+               public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
+               {
+                       DelegatePrimitiveParamsInOut de = new DelegatePrimitiveParamsInOut (RemoteObject.PrimitiveParamsInOut);
+                       return de (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+               }
+
+               public override Complex ComplexParams (ArrayList a, Complex b, string c)
+               {
+                       DelegateComplexParams de = new DelegateComplexParams (RemoteObject.ComplexParams);
+                       return de (a,b,c);
+               }
+
+               public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
+               {
+                       DelegateComplexParamsInOut de = new DelegateComplexParamsInOut (RemoteObject.ComplexParamsInOut);
+                       return de (ref a, out b, c);
+               }
+       }
+
+       public class DelegateAbstractSurrogate : AbstractSurrogate
+       {
+               public override int Simple ()
+               {
+                       DelegateSimple de = new DelegateSimple (RemoteObject.Simple);
+                       return de ();
+               }
+
+               public override string PrimitiveParams (int a, uint b, char c, string d)
+               {
+                       DelegatePrimitiveParams de = new DelegatePrimitiveParams (RemoteObject.PrimitiveParams);
+                       return de (a,b,c,d);
+               }
+
+               public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
+               {
+                       DelegatePrimitiveParamsInOut de = new DelegatePrimitiveParamsInOut (RemoteObject.PrimitiveParamsInOut);
+                       return de (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+               }
+
+               public override Complex ComplexParams (ArrayList a, Complex b, string c)
+               {
+                       DelegateComplexParams de = new DelegateComplexParams (RemoteObject.ComplexParams);
+                       return de (a,b,c);
+               }
+
+               public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
+               {
+                       DelegateComplexParamsInOut de = new DelegateComplexParamsInOut (RemoteObject.ComplexParamsInOut);
+                       return de (ref a, out b, c);
+               }
+       }
+
+       public class DelegateInterfaceSurrogate : InterfaceSurrogate
+       {
+               public override int Simple ()
+               {
+                       DelegateSimple de = new DelegateSimple (RemoteObject.Simple);
+                       return de ();
+               }
+
+               public override string PrimitiveParams (int a, uint b, char c, string d)
+               {
+                       DelegatePrimitiveParams de = new DelegatePrimitiveParams (RemoteObject.PrimitiveParams);
+                       return de (a,b,c,d);
+               }
+
+               public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
+               {
+                       DelegatePrimitiveParamsInOut de = new DelegatePrimitiveParamsInOut (RemoteObject.PrimitiveParamsInOut);
+                       return de (ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+               }
+
+               public override Complex ComplexParams (ArrayList a, Complex b, string c)
+               {
+                       DelegateComplexParams de = new DelegateComplexParams (RemoteObject.ComplexParams);
+                       return de (a,b,c);
+               }
+
+               public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
+               {
+                       DelegateComplexParamsInOut de = new DelegateComplexParamsInOut (RemoteObject.ComplexParamsInOut);
+                       return de (ref a, out b, c);
+               }
+       }
+}
index 97caaa4745af420a57531eea45e966b3cf92a47e..6ba81691fd9ec88f0b674b71ebcfd22abb8e5d52 100644 (file)
@@ -41,6 +41,15 @@ namespace MonoTests.System.Runtime.Remoting
                }
        }
 
+       [TestFixture]
+       public class HttpDelegateCallTest : DelegateCallTest
+       {
+               public override ChannelManager CreateChannelManager ()
+               {
+                       return new HttpChannelManager ();
+               }
+       }
+
        [Serializable]
        public class HttpChannelManager : ChannelManager
        {
index c6a49719a6fd5e361dd8c32e2cdfa3787b2b7f21..e7d4b5cd25301eb9d12645409c8c5abe976cb4c4 100644 (file)
@@ -19,24 +19,24 @@ namespace MonoTests.System.Runtime.Remoting
                public override AbstractSurrogate GetAbstractSurrogate () { return new ReflectionAbstractSurrogate (); }
                public override InterfaceSurrogate GetInterfaceSurrogate () { return new ReflectionInterfaceSurrogate (); }
 
-               public static int Simple (object target)
+               public static int Simple (Type type, object target)
                {
                        object[] parms = new object[0];
-                       MethodBase m = target.GetType ().GetMethod ("Simple");
+                       MethodBase m = type.GetMethod ("Simple");
                        return (int) m.Invoke (target, parms);
                }
 
-               public static string PrimitiveParams (object target, int a, uint b, char c, string d)
+               public static string PrimitiveParams (Type type, object target, int a, uint b, char c, string d)
                {
                        object[] parms = new object[] {a,b,c,d};
-                       MethodBase m = target.GetType ().GetMethod ("PrimitiveParams");
+                       MethodBase m = type.GetMethod ("PrimitiveParams");
                        return (string) m.Invoke (target, parms);
                }
 
-               public static string PrimitiveParamsInOut (object target, ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
+               public static string PrimitiveParamsInOut (Type type, object target, ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
                {
                        object[] parms = new object[] {a1,0,b1,0f,c1,'\0',d1,null};
-                       MethodBase m = target.GetType ().GetMethod ("PrimitiveParamsInOut");
+                       MethodBase m = type.GetMethod ("PrimitiveParamsInOut");
                        string res = (string) m.Invoke (target, parms);
                        a1 = (int)parms[0];
                        b1 = (float)parms[2];
@@ -49,17 +49,17 @@ namespace MonoTests.System.Runtime.Remoting
                        return res;
                }
 
-               public static Complex ComplexParams (object target, ArrayList a, Complex b, string c)
+               public static Complex ComplexParams (Type type, object target, ArrayList a, Complex b, string c)
                {
                        object[] parms = new object[] {a,b,c};
-                       MethodBase m = target.GetType ().GetMethod ("ComplexParams");
+                       MethodBase m = type.GetMethod ("ComplexParams");
                        return (Complex) m.Invoke (target, parms);
                }
 
-               public static Complex ComplexParamsInOut (object target, ref ArrayList a, out Complex b, string c)
+               public static Complex ComplexParamsInOut (Type type, object target, ref ArrayList a, out Complex b, string c)
                {
                        object[] parms = new object[] {a,null,c};
-                       MethodBase m = target.GetType ().GetMethod ("ComplexParamsInOut");
+                       MethodBase m = type.GetMethod ("ComplexParamsInOut");
                        Complex res = (Complex) m.Invoke (target, parms);
                        a = (ArrayList) parms[0];
                        b = (Complex) parms[1];
@@ -71,27 +71,27 @@ namespace MonoTests.System.Runtime.Remoting
        {
                public override int Simple ()
                {
-                       return ReflectionCallTest.Simple (RemoteObject);
+                       return ReflectionCallTest.Simple (typeof (RemoteObject), RemoteObject);
                }
 
                public override string PrimitiveParams (int a, uint b, char c, string d)
                {
-                       return ReflectionCallTest.PrimitiveParams (RemoteObject, a, b, c, d);
+                       return ReflectionCallTest.PrimitiveParams (typeof (RemoteObject), RemoteObject, a, b, c, d);
                }
 
                public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
                {
-                       return ReflectionCallTest.PrimitiveParamsInOut (RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+                       return ReflectionCallTest.PrimitiveParamsInOut (typeof (RemoteObject), RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
                }
 
                public override Complex ComplexParams (ArrayList a, Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParams (RemoteObject, a, b, c);
+                       return ReflectionCallTest.ComplexParams (typeof (RemoteObject), RemoteObject, a, b, c);
                }
 
                public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParamsInOut (RemoteObject, ref a, out b, c);
+                       return ReflectionCallTest.ComplexParamsInOut (typeof (RemoteObject), RemoteObject, ref a, out b, c);
                }
        }
 
@@ -99,27 +99,27 @@ namespace MonoTests.System.Runtime.Remoting
        {
                public override int Simple ()
                {
-                       return ReflectionCallTest.Simple (RemoteObject);
+                       return ReflectionCallTest.Simple (typeof (AbstractRemoteObject), RemoteObject);
                }
 
                public override string PrimitiveParams (int a, uint b, char c, string d)
                {
-                       return ReflectionCallTest.PrimitiveParams (RemoteObject, a, b, c, d);
+                       return ReflectionCallTest.PrimitiveParams (typeof (AbstractRemoteObject), RemoteObject, a, b, c, d);
                }
 
                public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
                {
-                       return ReflectionCallTest.PrimitiveParamsInOut (RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+                       return ReflectionCallTest.PrimitiveParamsInOut (typeof (AbstractRemoteObject), RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
                }
 
                public override Complex ComplexParams (ArrayList a, Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParams (RemoteObject, a, b, c);
+                       return ReflectionCallTest.ComplexParams (typeof (AbstractRemoteObject), RemoteObject, a, b, c);
                }
 
                public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParamsInOut (RemoteObject, ref a, out b, c);
+                       return ReflectionCallTest.ComplexParamsInOut (typeof (AbstractRemoteObject), RemoteObject, ref a, out b, c);
                }
        }
 
@@ -127,27 +127,27 @@ namespace MonoTests.System.Runtime.Remoting
        {
                public override int Simple ()
                {
-                       return ReflectionCallTest.Simple (RemoteObject);
+                       return ReflectionCallTest.Simple (typeof (IRemoteObject), RemoteObject);
                }
 
                public override string PrimitiveParams (int a, uint b, char c, string d)
                {
-                       return ReflectionCallTest.PrimitiveParams (RemoteObject, a, b, c, d);
+                       return ReflectionCallTest.PrimitiveParams (typeof (IRemoteObject), RemoteObject, a, b, c, d);
                }
 
                public override string PrimitiveParamsInOut (ref int a1, out int a2, ref float b1, out float b2, ref char c1, out char c2, ref string d1, out string d2)
                {
-                       return ReflectionCallTest.PrimitiveParamsInOut (RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
+                       return ReflectionCallTest.PrimitiveParamsInOut (typeof (IRemoteObject), RemoteObject, ref a1, out a2, ref b1, out b2, ref c1, out c2, ref d1, out d2);
                }
 
                public override Complex ComplexParams (ArrayList a, Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParams (RemoteObject, a, b, c);
+                       return ReflectionCallTest.ComplexParams (typeof (IRemoteObject), RemoteObject, a, b, c);
                }
 
                public override Complex ComplexParamsInOut (ref ArrayList a, out Complex b, string c)
                {
-                       return ReflectionCallTest.ComplexParamsInOut (RemoteObject, ref a, out b, c);
+                       return ReflectionCallTest.ComplexParamsInOut (typeof (IRemoteObject), RemoteObject, ref a, out b, c);
                }
        }
 }
index 1003b5f8d9b6e2b89bf1967aca3b253fd9cd914a..6639d76f6be449b943edbbbbc68d171d3e06dff1 100644 (file)
@@ -41,6 +41,15 @@ namespace MonoTests.System.Runtime.Remoting
                }
        }
 
+       [TestFixture]
+       public class TcpDelegateCallTest : DelegateCallTest
+       {
+               public override ChannelManager CreateChannelManager ()
+               {
+                       return new TcpChannelManager ();
+               }
+       }
+
        [Serializable]
        public class TcpChannelManager : ChannelManager
        {