Esempio n. 1
0
        public void TestIsAForProxyNonSupIf()
        {
            MarshalByRefObject mbr = new IsARemoteIfTestImpl2();
            string             uri = "TestIsAForProxyNonSupIf";
            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);
            }
        }
Esempio n. 2
0
        public void TestIsAForImplNonSupIf()
        {
            MarshalByRefObject mbr = new IsARemoteIfTestImpl2();
            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");
        }
        public void TestIsAForImplNonSupIf()
        {
            MarshalByRefObject mbr = new IsARemoteIfTestImpl2();
            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");
        }
 public void TestIsAForProxyNonSupIf()
 {
     MarshalByRefObject mbr = new IsARemoteIfTestImpl2();
     string uri = "TestIsAForProxyNonSupIf";
     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);
     }
 }