public void TestIsAForProxySupIf() { MarshalByRefObject mbr = new IsARemoteIfTestImpl1(); string uri = "TestIsAForProxySupIf"; Type type = typeof(IsARemoteIfTestInterface); string repId = "IDL:Ch/Elca/Iiop/Tests/IsARemoteIfTestInterface:1.0"; try { RemotingServices.Marshal(mbr, uri); IsARemoteIfTestInterface proxy = (IsARemoteIfTestInterface) RemotingServices.Connect(type, "iiop://localhost:" + TEST_PORT + "/" + uri); Assert.IsTrue( m_orb.is_a(proxy, repId), "is_a check for proxy rep-id"); Assert.IsTrue(m_orb.is_a(proxy, type), "is_a check for proxy type based"); Assert.IsTrue( !m_orb.is_a(proxy, typeof(IsARemoteIfTestInterfaceNotImpl)), "is_a check for incompatible type"); } finally { RemotingServices.Disconnect(mbr); } }
public void TestIsAForImplSupIf() { MarshalByRefObject mbr = new IsARemoteIfTestImpl1(); Type type = typeof(IsARemoteIfTestInterface); string repId = "IDL:Ch/Elca/Iiop/Tests/IsARemoteIfTestInterface:1.0"; Assert.IsTrue( m_orb.is_a(mbr, repId), "is_a check for proxy rep-id"); Assert.IsTrue(m_orb.is_a(mbr, type), "is_a check for proxy type based"); Assert.IsTrue( !m_orb.is_a(mbr, typeof(IsARemoteIfTestInterfaceNotImpl)), "is_a check for incompatible type"); }