@Test public void testStructuredEventWithStartTimeProperty() throws Exception { structuredEvent_.header.variable_header = new Property[1]; Date _now = new Date(); Any _startTimeAny = getORB().create_any(); UtcT _startTime = Time.corbaTime(_now); UtcTHelper.insert(_startTimeAny, _startTime); structuredEvent_.header.variable_header[0] = new Property(StartTime.value, _startTimeAny); Message _event = messageFactory_.newMessage(structuredEvent_, proxyConsumerMock_); assertTrue(_event.hasStartTime()); assertEquals(_now.getTime(), _event.getStartTime()); }
@Test public void testAnyEventHasNoStartTime() throws Exception { Message _event = messageFactory_.newMessage(getORB().create_any()); assertTrue(!_event.hasStartTime()); }
@Test public void testStructuredEventWithoutStartTimeProperty() throws Exception { Message _event = messageFactory_.newMessage(structuredEvent_); assertTrue(!_event.hasStartTime()); }