Remove DNS lookups of the local hostname in tests (#18059)
[mono-project.git] / mcs / class / System.Runtime.Remoting / Test / RemotingServicesTest.cs
blobd5e1e44a500efc8fd19427edc950445b7429ae83
1 //
2 // System.Runtime.Remoting.RemotingServices NUnit V2.0 test class
3 //
4 // Author Jean-Marc ANDRE (jean-marc.andre@polymtl.ca)
5 //
6 // ToDo: I didn't write test functions for the method not yep
7 // implemented by Mono
9 using System;
10 using System.Collections;
11 using NUnit.Framework;
12 using System.Reflection;
13 using System.Runtime.Remoting;
14 using System.Threading;
15 using System.Runtime.Remoting.Activation;
16 using System.Runtime.Remoting.Messaging;
17 using System.Runtime.Remoting.Proxies;
18 using System.Runtime.Remoting.Channels;
19 using System.Runtime.Remoting.Channels.Tcp;
21 using MonoTests.Helpers;
23 namespace MonoTests.System.Runtime.Remoting.RemotingServicesInternal
25 // We need our own proxy to intercept messages to remote object
26 // and forward them using RemotingServices.ExecuteMessage
27 public class MyProxy : RealProxy
29 MarshalByRefObject target;
30 IMessageSink _sink;
31 MethodBase _mthBase;
32 bool methodOverloaded = false;
34 public MethodBase MthBase {
35 get { return _mthBase; }
38 public bool IsMethodOverloaded {
39 get { return methodOverloaded; }
42 public MyProxy (Type serverType, MarshalByRefObject target)
43 : base (serverType)
45 this.target = target;
47 IChannel [] registeredChannels = ChannelServices.RegisteredChannels;
48 string ObjectURI;
50 // A new IMessageSink chain has to be created
51 // since the RemotingServices.GetEnvoyChainForProxy() is not yet
52 // implemented.
53 foreach (IChannel channel in registeredChannels) {
54 IChannelSender channelSender = channel as IChannelSender;
55 if (channelSender != null) {
56 _sink = (IMessageSink) channelSender.CreateMessageSink (RemotingServices.GetObjectUri (target), null, out ObjectURI);
62 // Messages will be intercepted here and redirected
63 // to another object.
64 public override IMessage Invoke (IMessage msg)
66 try {
67 if (msg is IConstructionCallMessage) {
68 IActivator remActivator = (IActivator) RemotingServices.Connect (typeof (IActivator), "tcp://localhost:1234/RemoteActivationService.rem");
69 IConstructionReturnMessage crm = remActivator.Activate ((IConstructionCallMessage) msg);
70 return crm;
71 } else {
72 methodOverloaded = RemotingServices.IsMethodOverloaded ((IMethodMessage) msg);
74 _mthBase = RemotingServices.GetMethodBaseFromMethodMessage ((IMethodMessage) msg);
75 MethodCallMessageWrapper mcm = new MethodCallMessageWrapper ((IMethodCallMessage) msg);
76 mcm.Uri = RemotingServices.GetObjectUri ((MarshalByRefObject) target);
77 MarshalByRefObject objRem = (MarshalByRefObject) Activator.CreateInstance (GetProxiedType ());
78 RemotingServices.ExecuteMessage ((MarshalByRefObject) objRem, (IMethodCallMessage) msg);
79 IMessage rtnMsg = null;
81 try {
82 rtnMsg = _sink.SyncProcessMessage (msg);
83 } catch (Exception e) {
84 Console.WriteLine (e.Message);
87 Console.WriteLine ("RR:" + rtnMsg);
88 return rtnMsg;
90 } catch (Exception ex) {
91 Console.WriteLine (ex);
92 return null;
95 } // end MyProxy
97 // This class is used to create "CAO"
98 public class MarshalObjectFactory : MarshalByRefObject
100 public MarshalObject GetNewMarshalObject ()
102 return new MarshalObject ();
106 // A class used by the tests
107 public class MarshalObject : ContextBoundObject
109 public MarshalObject ()
114 public MarshalObject (int id, string uri)
116 this.id = id;
117 this.uri = uri;
120 public int Id {
121 get { return id; }
122 set { id = value; }
125 public string Uri {
126 get { return uri; }
129 public void Method1 ()
131 _called++;
132 methodOneWay = RemotingServices.IsOneWay (MethodBase.GetCurrentMethod ());
135 public void Method2 ()
137 methodOneWay = RemotingServices.IsOneWay (MethodBase.GetCurrentMethod ());
140 public void Method2 (int i)
142 methodOneWay = RemotingServices.IsOneWay (MethodBase.GetCurrentMethod ());
145 [OneWay ()]
146 public void Method3 ()
148 methodOneWay = RemotingServices.IsOneWay (MethodBase.GetCurrentMethod ());
151 public static int Called {
152 get { return _called; }
155 public static bool IsMethodOneWay {
156 get { return methodOneWay; }
159 private static int _called;
160 private int id = 0;
161 private string uri;
162 private static bool methodOneWay = false;
165 // Another class used by the tests
166 public class DerivedMarshalObject : MarshalObject
168 public DerivedMarshalObject () { }
170 public DerivedMarshalObject (int id, string uri) : base (id, uri) { }
173 interface A
177 interface B : A
181 public class CC : MarshalByRefObject
185 public class DD : MarshalByRefObject
190 } // namespace MonoTests.System.Runtime.Remoting.RemotingServicesInternal
192 namespace MonoTests.Remoting
194 using MonoTests.System.Runtime.Remoting.RemotingServicesInternal;
196 // The main test class
197 [TestFixture]
198 public class RemotingServicesTest
200 private static int MarshalObjectId = 0;
202 public RemotingServicesTest ()
204 MarshalObjectId = 0;
207 // Helper function that create a new
208 // MarshalObject with an unique ID
209 private static MarshalObject NewMarshalObject ()
211 string uri = "MonoTests.System.Runtime.Remoting.RemotingServicesTest.MarshalObject" + MarshalObjectId.ToString ();
212 MarshalObject objMarshal = new MarshalObject (MarshalObjectId, uri);
214 MarshalObjectId++;
216 return objMarshal;
219 // Another helper function
220 private DerivedMarshalObject NewDerivedMarshalObject ()
222 string uri = "MonoTests.System.Runtime.Remoting.RemotingServicesTest.DerivedMarshalObject" + MarshalObjectId.ToString ();
223 DerivedMarshalObject objMarshal = new DerivedMarshalObject (MarshalObjectId, uri);
225 MarshalObjectId++;
227 return objMarshal;
230 // The two folling method test RemotingServices.Marshal()
231 [Test]
232 public void Marshal1 ()
235 MarshalObject objMarshal = NewMarshalObject ();
236 ObjRef objRef = RemotingServices.Marshal (objMarshal);
238 Assert.IsNotNull (objRef.URI, "#A01");
240 MarshalObject objRem = (MarshalObject) RemotingServices.Unmarshal (objRef);
241 Assert.AreEqual (objMarshal.Id, objRem.Id, "#A02");
243 objRem.Id = 2;
244 Assert.AreEqual (objMarshal.Id, objRem.Id, "#A03");
246 // TODO: uncomment when RemotingServices.Disconnect is implemented
247 //RemotingServices.Disconnect(objMarshal);
249 objMarshal = NewMarshalObject ();
251 objRef = RemotingServices.Marshal (objMarshal, objMarshal.Uri);
253 Assert.IsTrue (objRef.URI.EndsWith (objMarshal.Uri), "#A04");
254 // TODO: uncomment when RemotingServices.Disconnect is implemented
255 //RemotingServices.Disconnect(objMarshal);
258 [Test]
259 public void Marshal2 ()
261 DerivedMarshalObject derivedObjMarshal = NewDerivedMarshalObject ();
263 ObjRef objRef = RemotingServices.Marshal (derivedObjMarshal, derivedObjMarshal.Uri, typeof (MarshalObject));
265 // Check that the type of the marshaled object is MarshalObject
266 Assert.IsTrue (objRef.TypeInfo.TypeName.StartsWith ((typeof (MarshalObject)).ToString ()), "#A05");
268 // TODO: uncomment when RemotingServices.Disconnect is implemented
269 //RemotingServices.Disconnect(derivedObjMarshal);
272 // Tests RemotingServices.GetObjectUri()
273 [Test]
274 public void GetObjectUri ()
276 MarshalObject objMarshal = NewMarshalObject ();
278 Assert.IsNull (RemotingServices.GetObjectUri (objMarshal), "#A06");
280 RemotingServices.Marshal (objMarshal);
282 Assert.IsNotNull (RemotingServices.GetObjectUri (objMarshal), "#A07");
283 // TODO: uncomment when RemotingServices.Disconnect is implemented
284 //RemotingServices.Disconnect(objMarshal);
287 // Tests RemotingServices.Connect
288 [Test]
289 public void Connect ()
291 var port = NetworkHelpers.FindFreePort ();
292 MarshalObject objMarshal = NewMarshalObject ();
294 IDictionary props = new Hashtable ();
295 props ["name"] = objMarshal.Uri;
296 props ["port"] = port;
297 props ["bindTo"] = "127.0.0.1";
298 TcpChannel chn = new TcpChannel (props, null, null);
299 ChannelServices.RegisterChannel (chn);
301 try {
302 RemotingServices.Marshal (objMarshal, objMarshal.Uri);
303 MarshalObject objRem = (MarshalObject) RemotingServices.Connect (typeof (MarshalObject), $"tcp://localhost:{port}/" + objMarshal.Uri);
304 Assert.IsTrue (RemotingServices.IsTransparentProxy (objRem), "#A08");
305 } finally {
306 ChannelServices.UnregisterChannel (chn);
307 RemotingServices.Disconnect (objMarshal);
311 // Tests RemotingServices.Marshal()
312 [Test]
313 public void MarshalThrowException ()
315 var port = NetworkHelpers.FindFreePort ();
316 MarshalObject objMarshal = NewMarshalObject ();
318 IDictionary props = new Hashtable ();
319 props ["name"] = objMarshal.Uri;
320 props ["port"] = port;
321 props ["bindTo"] = "127.0.0.1";
322 TcpChannel chn = new TcpChannel (props, null, null);
323 ChannelServices.RegisterChannel (chn);
325 try {
326 RemotingServices.Marshal (objMarshal, objMarshal.Uri);
327 MarshalObject objRem = (MarshalObject) RemotingServices.Connect (typeof (MarshalObject), $"tcp://localhost:{port}/" + objMarshal.Uri);
328 // This line should throw a RemotingException
329 // It is forbidden to export an object which is not
330 // a real object
331 try {
332 RemotingServices.Marshal (objRem, objMarshal.Uri);
333 Assert.Fail ("#1");
334 } catch (RemotingException e) {
336 } finally {
337 ChannelServices.UnregisterChannel (chn);
339 // TODO: uncomment when RemotingServices.Disconnect is implemented
340 //RemotingServices.Disconnect(objMarshal);
344 // Tests RemotingServices.ExecuteMessage()
345 // also tests GetMethodBaseFromMessage()
346 // IsMethodOverloaded()
347 [Test]
348 public void ExecuteMessage ()
350 var port = NetworkHelpers.FindFreePort ();
351 IDictionary props = new Hashtable ();
352 props ["port"] = port;
353 props ["bindTo"] = "127.0.0.1";
354 TcpChannel chn = new TcpChannel (props, null, null);
355 ChannelServices.RegisterChannel (chn);
356 try {
357 MarshalObject objMarshal = NewMarshalObject ();
358 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), objMarshal.Uri, WellKnownObjectMode.SingleCall);
360 // use a proxy to catch the Message
361 MyProxy proxy = new MyProxy (typeof (MarshalObject), (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/" + objMarshal.Uri));
363 MarshalObject objRem = (MarshalObject) proxy.GetTransparentProxy ();
365 objRem.Method1 ();
367 // Tests RemotingServices.GetMethodBaseFromMethodMessage()
368 Assert.AreEqual ("Method1", proxy.MthBase.Name, "#A09");
369 Assert.IsFalse (proxy.IsMethodOverloaded, "#A09.1");
371 objRem.Method2 ();
372 Assert.IsTrue (proxy.IsMethodOverloaded, "#A09.2");
374 // Tests RemotingServices.ExecuteMessage();
375 // If ExecuteMessage does it job well, Method1 should be called 2 times
376 Assert.AreEqual (2, MarshalObject.Called, "#A10");
377 } finally {
378 ChannelServices.UnregisterChannel (chn);
382 // Tests the IsOneWay method
383 [Test]
384 public void IsOneWay ()
386 var port = NetworkHelpers.FindFreePort ();
387 IDictionary props = new Hashtable ();
388 props ["port"] = port;
389 props ["bindTo"] = "127.0.0.1";
390 TcpChannel chn = new TcpChannel (props, null, null);
391 ChannelServices.RegisterChannel (chn);
392 try {
393 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject.rem", WellKnownObjectMode.Singleton);
395 MarshalObject objRem = (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/MarshalObject.rem");
397 Assert.IsTrue (RemotingServices.IsTransparentProxy (objRem), "#A10.1");
399 objRem.Method1 ();
400 Thread.Sleep (20);
401 Assert.IsFalse (MarshalObject.IsMethodOneWay, "#A10.2");
402 objRem.Method3 ();
403 Thread.Sleep (20);
404 Assert.IsTrue (MarshalObject.IsMethodOneWay, "#A10.3");
405 } finally {
406 ChannelServices.UnregisterChannel (chn);
410 [Test]
411 public void GetObjRefForProxy ()
413 var port = NetworkHelpers.FindFreePort ();
414 IDictionary props = new Hashtable ();
415 props ["port"] = port;
416 props ["bindTo"] = "127.0.0.1";
417 TcpChannel chn = new TcpChannel (props, null, null);
418 ChannelServices.RegisterChannel (chn);
419 try {
420 // Register le factory as a SAO
421 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObjectFactory), "MonoTests.System.Runtime.Remoting.RemotingServicesTest.Factory.soap", WellKnownObjectMode.Singleton);
423 MarshalObjectFactory objFactory = (MarshalObjectFactory) Activator.GetObject (typeof (MarshalObjectFactory), $"tcp://localhost:{port}/MonoTests.System.Runtime.Remoting.RemotingServicesTest.Factory.soap");
425 // Get a new "CAO"
426 MarshalObject objRem = objFactory.GetNewMarshalObject ();
428 ObjRef objRefRem = RemotingServices.GetObjRefForProxy ((MarshalByRefObject) objRem);
430 Assert.IsNotNull (objRefRem, "#A11");
431 } finally {
432 ChannelServices.UnregisterChannel (chn);
436 // Tests GetRealProxy
437 [Test]
438 public void GetRealProxy ()
440 var port = NetworkHelpers.FindFreePort ();
441 IDictionary props = new Hashtable ();
442 props ["port"] = port;
443 props ["bindTo"] = "127.0.0.1";
444 TcpChannel chn = new TcpChannel (props, null, null);
445 ChannelServices.RegisterChannel (chn);
446 try {
447 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MonoTests.System.Runtime.Remoting.RemotingServicesTest.MarshalObject.soap", WellKnownObjectMode.Singleton);
449 MyProxy proxy = new MyProxy (typeof (MarshalObject), (MarshalByRefObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/MonoTests.System.Runtime.Remoting.RemotingServicesTest.MarshalObject.soap"));
450 MarshalObject objRem = (MarshalObject) proxy.GetTransparentProxy ();
452 RealProxy rp = RemotingServices.GetRealProxy (objRem);
454 Assert.IsNotNull (rp, "#A12");
455 Assert.AreEqual ("MonoTests.System.Runtime.Remoting.RemotingServicesInternal.MyProxy", rp.GetType ().ToString (), "#A13");
456 } finally {
457 ChannelServices.UnregisterChannel (chn);
461 // Tests SetObjectUriForMarshal()
462 [Test]
463 public void SetObjectUriForMarshal ()
465 var port = NetworkHelpers.FindFreePort ();
466 IDictionary props = new Hashtable ();
467 props ["port"] = port;
468 props ["bindTo"] = "127.0.0.1";
469 TcpChannel chn = new TcpChannel (props, null, null);
470 ChannelServices.RegisterChannel (chn);
471 try {
472 MarshalObject objRem = NewMarshalObject ();
473 RemotingServices.SetObjectUriForMarshal (objRem, objRem.Uri);
474 RemotingServices.Marshal (objRem);
476 objRem = (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/" + objRem.Uri);
477 Assert.IsNotNull (objRem, "#A14");
478 } finally {
479 ChannelServices.UnregisterChannel (chn);
484 // Tests GetServeurTypeForUri()
485 [Test]
486 public void GetServeurTypeForUri ()
488 var port = NetworkHelpers.FindFreePort ();
489 IDictionary props = new Hashtable ();
490 props ["port"] = port;
491 props ["bindTo"] = "127.0.0.1";
492 TcpChannel chn = new TcpChannel (props, null, null);
493 Type type = typeof (MarshalObject);
494 ChannelServices.RegisterChannel (chn);
495 try {
496 MarshalObject objRem = NewMarshalObject ();
497 RemotingServices.SetObjectUriForMarshal (objRem, objRem.Uri);
498 RemotingServices.Marshal (objRem);
500 Type typeRem = RemotingServices.GetServerTypeForUri (RemotingServices.GetObjectUri (objRem));
501 Assert.AreEqual (type, typeRem, "#A15");
502 } finally {
503 ChannelServices.UnregisterChannel (chn);
507 // Tests IsObjectOutOfDomain
508 // Tests IsObjectOutOfContext
509 [Test]
510 [Category ("NotWorking")]
511 public void IsObjectOutOf ()
513 var port = NetworkHelpers.FindFreePort ();
514 IDictionary props = new Hashtable ();
515 props ["port"] = port;
516 props ["bindTo"] = "127.0.0.1";
517 TcpChannel chn = new TcpChannel (props, null, null);
518 ChannelServices.RegisterChannel (chn);
519 try {
520 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject2.rem", WellKnownObjectMode.Singleton);
522 MarshalObject objRem = (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/MarshalObject2.rem");
524 Assert.IsTrue (RemotingServices.IsObjectOutOfAppDomain (objRem), "#A16");
525 Assert.IsTrue (RemotingServices.IsObjectOutOfContext (objRem), "#A17");
527 MarshalObject objMarshal = new MarshalObject ();
528 Assert.IsFalse (RemotingServices.IsObjectOutOfAppDomain (objMarshal), "#A18");
529 Assert.IsFalse (RemotingServices.IsObjectOutOfContext (objMarshal), "#A19");
530 } finally {
531 ChannelServices.UnregisterChannel (chn);
535 [Test]
536 public void ApplicationNameTest ()
538 var port = NetworkHelpers.FindFreePort ();
539 RemotingConfiguration.ApplicationName = "app";
540 IDictionary props = new Hashtable ();
541 props ["port"] = port;
542 props ["bindTo"] = "127.0.0.1";
543 TcpChannel chn = new TcpChannel (props, null, null);
544 ChannelServices.RegisterChannel (chn);
545 try {
546 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "obj3.rem", WellKnownObjectMode.Singleton);
548 MarshalObject objRem = (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/app/obj3.rem");
549 MarshalObject objRem2 = (MarshalObject) Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/obj3.rem");
551 Assert.IsTrue (RemotingServices.IsTransparentProxy (objRem), "#AN1");
552 Assert.IsTrue (RemotingServices.IsTransparentProxy (objRem2), "#AN2");
554 Assert.IsNotNull (RemotingServices.GetServerTypeForUri ("obj3.rem"), "#AN3");
555 Assert.IsNotNull (RemotingServices.GetServerTypeForUri ("/app/obj3.rem"), "#AN4");
556 Assert.IsNull (RemotingServices.GetServerTypeForUri ("//app/obj3.rem"), "#AN5");
557 Assert.IsNull (RemotingServices.GetServerTypeForUri ("app/obj3.rem"), "#AN6");
558 Assert.IsNull (RemotingServices.GetServerTypeForUri ("/whatever/obj3.rem"), "#AN7");
559 Assert.IsNotNull (RemotingServices.GetServerTypeForUri ("/obj3.rem"), "#AN8");
560 Assert.IsNull (RemotingServices.GetServerTypeForUri ("//obj3.rem"), "#AN9");
561 } finally {
562 ChannelServices.UnregisterChannel (chn);
566 [Test]
567 public void GetObjectWithChannelDataTest ()
569 var port = NetworkHelpers.FindFreePort ();
570 IDictionary props = new Hashtable ();
571 props ["port"] = port;
572 props ["bindTo"] = "127.0.0.1";
573 TcpChannel chn = new TcpChannel (props, null, null);
574 ChannelServices.RegisterChannel (chn);
575 try {
576 RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "getobjectwithchanneldata.rem", WellKnownObjectMode.Singleton);
578 string channelData = "test";
579 Assert.IsNotNull (Activator.GetObject (typeof (MarshalObject), $"tcp://localhost:{port}/getobjectwithchanneldata.rem", channelData), "#01");
580 } finally {
581 ChannelServices.UnregisterChannel (chn);
585 public interface IMarshalTest
587 void DoSomething();
590 public interface ITest2 : IMarshalTest
592 void DoSomethingElse();
595 public class TestClass : MarshalByRefObject, ITest2
597 public void DoSomething()
601 public void DoSomethingElse()
606 [Test]
607 public void MarshalBaseInterfaces()
609 TestClass test = new TestClass();
610 ObjRef obj = RemotingServices.Marshal(test, "TestClass", typeof(ITest2));
611 FieldInfo interfacesImplemented = obj.TypeInfo.GetType().GetField("interfacesImplemented", BindingFlags.NonPublic | BindingFlags.Instance);
612 string[] interfaces = (string[])interfacesImplemented.GetValue(obj.TypeInfo);
613 Assert.AreEqual(2, interfaces.Length);
614 Assert.IsTrue(interfaces[0].Contains("IMarshalTest"));
615 Assert.IsTrue(interfaces[1].Contains("ITest2"));
618 [Test]
619 [Ignore ("We cannot test RemotingConfiguration.Configure() because it keeps channels registered. If we really need to test it, do it as a standalone case")]
620 public void ConnectProxyCast ()
622 var port = NetworkHelpers.FindFreePort ();
623 object o;
624 RemotingConfiguration.Configure (null);
626 o = RemotingServices.Connect (typeof (MarshalByRefObject), $"tcp://localhost:{port}/ff1.rem");
627 Assert.IsInstanceOfType (typeof (DD), o, "#m1");
628 Assert.IsInstanceOfType (typeof (A), o, "#m2");
629 Assert.IsInstanceOfType (typeof (B), o, "#m3");
630 AssertHelper.IsNotInstanceOfType (typeof (CC), !(o is CC), "#m4");
632 o = RemotingServices.Connect (typeof (A), $"tcp://localhost:{port}/ff3.rem");
633 Assert.IsInstanceOfType (typeof (DD), o, "#a1");
634 Assert.IsInstanceOfType (typeof (A), o, "#a2");
635 Assert.IsInstanceOfType (typeof (B), o, "#a3");
636 AssertHelper.IsNotInstanceOfType (typeof (CC), o, "#a4");
638 o = RemotingServices.Connect (typeof (DD), $"tcp://localhost:{port}/ff4.rem");
639 Assert.IsInstanceOfType (typeof (DD), o, "#d1");
640 Assert.IsInstanceOfType (typeof (A), o, "#d2");
641 Assert.IsInstanceOfType (typeof (B), o, "#d3");
642 AssertHelper.IsNotInstanceOfType (typeof (CC), o, "#d4");
644 o = RemotingServices.Connect (typeof (CC), $"tcp://localhost:{port}/ff5.rem");
645 AssertHelper.IsNotInstanceOfType (typeof (DD), o, "#c1");
646 Assert.IsInstanceOfType (typeof (A), o, "#c2");
647 Assert.IsInstanceOfType (typeof (B), o, "#c3");
648 Assert.IsInstanceOfType (typeof (CC), o, "#c4");
650 // Don't add any tests that must create channels
651 // after ConnectProxyCast (), because this test calls
652 // RemotingConfiguration.Configure ().
653 } // end class RemotingServicesTest
654 } // end of namespace MonoTests.Remoting