public void TestCreateDeleteConnectorAndNoRegistrationWorksCorrectlyWithUsernameAndPassword()
        {
            uuid = factory.CreateDomainService(DomainName);

            Assert.IsFalse(factory.Registered(uuid));
            Assert.IsTrue(factory.GetDomainTypConnectorId(uuid).Equals(DomainName + "+external-connector-proxy+" + 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 TestConnectToXlinkWithAConnectorThatIsNotregisteredConnectorAndAnalyseTheException()
 {
     uuid = factory.CreateDomainService("example");
     try
     {
         factory.ConnectToXLink(uuid, "localhost", "example", null);
     }
     catch (BridgeException ex)
     {
         Assert.AreEqual <String>(ex.Message, "The connecotr with id " + uuid + " has no instance");
     }
     finally
     {
         factory.DeleteDomainService(uuid);
     }
 }
        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));
        }