Exemplo n.º 1
0
        public void TestCreateMoreConnectorAndStopAllWorksCorrectly()
        {
            String[] uuids = new String[10];
            for (int i = 0; i < uuids.Length; i++)
            {
                uuid     = factory.CreateDomainService(DomainName);
                uuids[i] = uuid;
                factory.RegisterConnector(uuid, DomainName);
                factory.UnRegisterConnector(uuid);
                factory.DeleteDomainService(uuid);
            }

            factory.StopAllConnections();
            foreach (String tmpuuid in uuids)
            {
                // Test if there is an connector that exists;
                try
                {
                    factory.GetDomainTypConnectorId(tmpuuid);
                    Assert.Fail();
                }
                catch (BridgeException ex)
                {
                    Assert.AreEqual <String>("There is no connector with the connectorId " + tmpuuid, ex.Message);
                }
            }
        }
        public void TestCreateRegisterEventHandlerUnregisterDeleteWorksCorrectlyWithUsernameAndPassword()
        {
            uuid = factory.RegisterConnector(NullString, DomainName);

            IExampleDomainEventsSoapBinding exampleDomain = factory.GetEventhandler <IExampleDomainEventsSoapBinding>(uuid);

            factory.UnRegisterConnector(uuid);
            factory.DeleteDomainService(uuid);
        }
 /// <summary>
 /// Unregisters the connector from XLink and removes it from the OpenEngSB
 /// </summary>
 public void disconnect()
 {
     outputLine("Disconnecting from OpenEngSB and XLink...");
     factory.DisconnectFromXLink(connectorUUID, hostIp);
     factory.UnRegisterConnector(connectorUUID);
     factory.DeleteDomainService(connectorUUID);
     factory.StopConnection(connectorUUID);
     outputLine("Disconnected.");
 }
        public void TestCreateRegisterConnecttoxlinkDisconnectfromXlinkUnregisterDeleteWithoutCreateMethodConnectorWorksCorrectly()
        {
            uuid = factory.RegisterConnector(null, DomainName);

            Assert.IsTrue(factory.Registered(uuid));
            Assert.IsFalse(factory.Registered("WRONG ID"));
            Assert.IsTrue(factory.GetDomainTypConnectorId(uuid).Equals(DomainName + "+external-connector-proxy+" + uuid));

            XLinkUrlBlueprint template = factory.ConnectToXLink(uuid, "localhost", DomainName, InitModelViewRelation());

            factory.DisconnectFromXLink(uuid, "localhost");
            factory.UnRegisterConnector(uuid);

            Assert.IsFalse(factory.Registered(uuid));

            factory.DeleteDomainService(uuid);

            Assert.IsFalse(factory.Registered(uuid));
        }