Package org.jacorb.notification.interfaces

Examples of org.jacorb.notification.interfaces.Message


        assertEquals("type", _event.header.fixed_header.event_type.type_name);
    }

    public void testNewEventAny() throws Exception
    {
        Message _notifyEvent = messageFactory_.newMessage(testPerson_);

        assertNotNull(_notifyEvent);
    }
View Full Code Here


        assertNotNull(_notifyEvent);
    }

    public void testAnyToStructured() throws Exception
    {
        Message _notifyEvent = messageFactory_.newMessage(testPerson_);
        StructuredEvent _structured = _notifyEvent.toStructuredEvent();
        assertNotNull(_structured);
        assertEquals("%ANY", _structured.header.fixed_header.event_type.type_name);
        assertEquals("", _structured.header.fixed_header.event_type.domain_name);
        assertEquals("", _structured.header.fixed_header.event_name);
View Full Code Here

        assertEquals("lastname", _p.last_name);
    }

    public void testAnyToAny() throws Exception
    {
        Message _notifyEvent = messageFactory_.newMessage(testPerson_);
        Any _anyEvent = _notifyEvent.toAny();
        assertNotNull(_anyEvent);

        Person _p = PersonHelper.extract(_anyEvent);
        assertNotNull(_p);
        assertEquals("firstname", _p.first_name);
View Full Code Here

    {
        Any _wrappedStructuredEvent = getORB().create_any();

        StructuredEventHelper.insert(_wrappedStructuredEvent, testStructured_);

        Message _mesg = messageFactory_.newMessage(_wrappedStructuredEvent,
                new IProxyConsumer()
                {
                    public boolean getStartTimeSupported()
                    {
                        return false;
                    }

                    public boolean getStopTimeSupported()
                    {
                        return false;
                    }

                    public FilterStage getFirstStage()
                    {
                        return null;
                    }
                });

        StructuredEvent _recvd = _mesg.toStructuredEvent();

        assertEquals(testStructured_.header.fixed_header.event_name,
                _recvd.header.fixed_header.event_name);

        assertEquals(testStructured_.remainder_of_body, _recvd.remainder_of_body);
View Full Code Here

        _wrappedAny.filterable_data = new Property[0];

        _wrappedAny.remainder_of_body = testPerson_;

        Message _mesg = messageFactory_.newMessage(_wrappedAny, new IProxyConsumer()
        {
            public boolean getStartTimeSupported()
            {
                return false;
            }

            public boolean getStopTimeSupported()
            {
                return false;
            }

            public FilterStage getFirstStage()
            {
                return null;
            }
        });

        assertEquals(testPerson_, _mesg.toAny());
    }
View Full Code Here

    private void runEvaluation(Any any, String expr, String expect) throws Exception
    {
        MessageFactory _notificationEventFactory = new DefaultMessageFactory(getConfiguration());

        Message _event = _notificationEventFactory.newMessage(any);
        try
        {
            runEvaluation(_event, expr, expect);
        } finally
        {
            _event.dispose();
        }
    }
View Full Code Here

    private void runEvaluation(StructuredEvent event, String expr, String expect) throws Exception
    {
        // TODO factor out MessageFactory to NotificationTestCase (all tests)
        MessageFactory _notificationEventFactory = new DefaultMessageFactory(getConfiguration());

        Message _event = _notificationEventFactory.newMessage(event);
        runEvaluation(_event, expr, expect);
    }
View Full Code Here

    }

    public void testDeliveryToNotConnectedDoesNotAccessMessage()
    {
        MockControl controlMessage = MockControl.createStrictControl(Message.class);
        Message mockMessage = (Message) controlMessage.getMock();

        controlMessage.replay();

        controlTaskExecutor_.replay();
View Full Code Here

    }

    public void testDeliveryToDisabledConsumerEnqueues() throws Exception
    {
        MockControl controlMessage = MockControl.createStrictControl(Message.class);
        Message mockMessage = (Message) controlMessage.getMock();

        mockMessage.clone();
        controlMessage.setReturnValue(mockMessage);

        controlMessage.replay();

        controlTaskExecutor_.replay();
View Full Code Here

    public void testDeliveryToConsumerDoesEnqueueAndDisposeMessage() throws Exception
    {
        StructuredEvent event = new StructuredEvent();

        MockControl controlMessage = MockControl.createStrictControl(Message.class);
        Message mockMessage = (Message) controlMessage.getMock();

        mockMessage.clone();
        controlMessage.setReturnValue(mockMessage);

        mockMessage.toStructuredEvent();
        controlMessage.setReturnValue(event);

        mockMessage.dispose();

        controlMessage.replay();

        controlTaskExecutor_.replay();
View Full Code Here

TOP

Related Classes of org.jacorb.notification.interfaces.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.