Пример #1
0
  @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());
  }
Пример #2
0
  @Test
  public void testAnyEventHasNoStartTime() throws Exception {
    Message _event = messageFactory_.newMessage(getORB().create_any());

    assertTrue(!_event.hasStartTime());
  }
Пример #3
0
  @Test
  public void testStructuredEventWithoutStartTimeProperty() throws Exception {
    Message _event = messageFactory_.newMessage(structuredEvent_);

    assertTrue(!_event.hasStartTime());
  }