Inheritance: Org.Openengsb.Loom.CSharp.Bridge.Implementation.RegistrationFunctions, IExampleDomainSoapBinding
        public void TestExampleCodeExecution()
        {
            Boolean xlink = false;
            ExampleDomainConnector exampleDomain = new ExampleDomainConnector();
            OOSourceCodeDomainConnector ooconnector = new OOSourceCodeDomainConnector();
            OpenEngSB300.SetSupport();
            IDomainFactory factory;
            string domainName;
            string destination = "tcp://localhost.:6549";
            if (xlink)
            {
                // if you are using xlink for the example, please use an other domain. Example domain is not linkable
                domainName = "oosourcecode";
                factory = DomainFactoryProvider.GetDomainFactoryInstance("3.0.0", destination, ooconnector, new RetryDefaultExceptionHandler());
            }
            else
            {
                domainName = "example";
                factory = DomainFactoryProvider.GetDomainFactoryInstance("3.0.0", destination, exampleDomain, new ForwardDefaultExceptionHandler());
            }

            String connectorId = factory.CreateDomainService(domainName);
            factory.RegisterConnector(connectorId, domainName);
            if (xlink)
            {
                XLinkUrlBlueprint template = factory.ConnectToXLink(connectorId, "localhost", domainName, InitModelViewRelation());
                factory.DisconnectFromXLink(connectorId, "localhost");
            }
            else
            {
                IExampleDomainEventsSoapBinding remotedomain = factory.GetEventhandler<IExampleDomainEventsSoapBinding>(connectorId);
                LogEvent logEvent = new LogEvent();
                logEvent.name = "Example";
                logEvent.level = "DEBUG";
                logEvent.message = "remoteTestEventLog";
                remotedomain.raiseEvent(logEvent);
            }

            factory.UnRegisterConnector(connectorId);
            factory.DeleteDomainService(connectorId);
            factory.StopConnection(connectorId);
        }
 public override void Init()
 {
     uuid = Guid.NewGuid().ToString();
     ExampleDomainConnector exampleDomain = new ExampleDomainConnector();
     factory = DomainFactoryProvider.GetDomainFactoryInstance(Version, Destination, exampleDomain, new ForwardDefaultExceptionHandler(), Username, Password);
 }
Exemplo n.º 3
0
 public override void Init()
 {
     exceptionHandler = new RetryDefaultExceptionHandler();
     ExampleDomainConnector exampleDomain = new ExampleDomainConnector();
     factory = DomainFactoryProvider.GetDomainFactoryInstance("3.0.0", Destination, exampleDomain, exceptionHandler);
 }
Exemplo n.º 4
0
 public void TestCreateRegisterCloseRegisterWorksCorrectly()
 {
     ExampleDomainConnector exampleDomain = new ExampleDomainConnector();
     IDomainFactory factory = DomainFactoryProvider.GetDomainFactoryInstance(Version, Destination, exampleDomain, exceptionHandler);
     String tmpuuid = null;
     uuid = factory.CreateDomainService(DomainName);
     factory.RegisterConnector(uuid, DomainName);
     factory.StopConnection(uuid);
     tmpuuid = uuid;
     factory.RegisterConnector(uuid, DomainName);
     factory.StopConnection(uuid);
     Assert.AreEqual<String>(tmpuuid, uuid);
 }