Examples of SessionEventType


Examples of rabbit.data.internal.xml.schema.events.SessionEventType

  }

  @Override
  public void testConvert() throws Exception {
    SessionEvent event = new SessionEvent(new Interval(0, 1));
    SessionEventType type = converter.convert(event);
    assertEquals(event.getInterval().toDurationMillis(), type.getDuration());
   
    event = new SessionEvent(new Interval(0, 1));
    type = converter.convert(event);
    assertEquals(event.getInterval().toDurationMillis(), type.getDuration());
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

    return list;
  }

  @Override
  protected SessionEventType createElement() {
    SessionEventType type = new SessionEventType();
    type.setDuration(19834);
    return type;
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

    return new SessionEventTypeMerger();
  }

  @Override
  protected SessionEventType createTargetType() {
    SessionEventType type = new SessionEventType();
    type.setDuration(109);
    return type;
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

    super.testMerger_withNotMergeableParam();
  }

  @Override
  public void testIsMergeable() throws Exception {
    assertTrue(merger.isMergeable(new SessionEventType(), new SessionEventType()));
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

  @Override
  public void testMerge() throws Exception {
    int duration1 = 9823;
    int duration2 = 120934;
    SessionEventType t1 = new SessionEventType();
    t1.setDuration(duration1);
    SessionEventType t2 = new SessionEventType();
    t2.setDuration(duration2);
   
    SessionEventType result = merger.merge(t1, t2);
    assertEquals(duration1 + duration2, result.getDuration());
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

  @Override
  public void testMerge_notModifyParams() throws Exception {
    int duration1 = 98123;
    int duration2 = 12934;
    SessionEventType t1 = new SessionEventType();
    t1.setDuration(duration1);
    SessionEventType t2 = new SessionEventType();
    t2.setDuration(duration2);
   
    SessionEventType result = merger.merge(t1, t2);
    assertNotSame(t1, result);
    assertNotSame(t2, result);
    assertEquals(duration1, t1.getDuration());
    assertEquals(duration2, t2.getDuration());
    assertEquals(duration1 + duration2, result.getDuration());
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

  public SessionEventConverter() {
  }

  @Override
  protected SessionEventType doConvert(SessionEvent event) {
    SessionEventType type = new SessionEventType();
    type.setDuration(event.getInterval().toDurationMillis());
    return type;
  }
View Full Code Here

Examples of rabbit.data.internal.xml.schema.events.SessionEventType

    return true;
  }

  @Override
  protected SessionEventType doMerge(SessionEventType t1, SessionEventType t2) {
    SessionEventType type = new SessionEventType();
    type.setDuration(t1.getDuration() + t2.getDuration());
    return type;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.