Esempio n. 1
0
        public void TestACustomCreatedExceptionHandlerWhichReturnsAValueAsResultThatGetsInvokedWithIcomingPort()
        {
            string destination = TcpUrlOpenEngSB + tmpGuid.ToString();

            IIncomingPort inPort = new JmsIncomingPort(destination, new TestCustomExceptionHandler(), ConnectorId);

            inPort.Close();

            Assert.AreEqual <String>(inPort.Receive(), "TestCase");
        }
Esempio n. 2
0
        private MethodResultMessage WaitAndCheckAnswer(JmsDestination destinationinfo, String id)
        {
            IIncomingPort       portIn = new JmsIncomingPort(JmsDestination.CreateDestinationString(destinationinfo.Host, id), ExceptionHandler, ConnectorId);
            string              reply  = portIn.Receive();
            MethodResultMessage result = Marshaller.UnmarshallObject <MethodResultMessage>(reply);

            portIn.Close();
            if (result.Result.Type == ReturnType.Exception)
            {
                throw new OpenEngSBException("Remote Exception while Registering service proxy", new Exception(result.Result.ClassName));
            }

            return(result);
        }