Examples of LaunchEventType


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

    }
  }

  @Test
  public void testIsMergeable_bothParamGetLaunchTypeIdReturnsNull() {
    LaunchEventType t1 = createTargetType();
    t1.setLaunchTypeId(null);
    LaunchEventType t2 = createTargetType();
    t2.setLaunchTypeId(null);

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_bothParamGetNameReturnsNull() {
    LaunchEventType t1 = createTargetType();
    t1.setName(null);
    LaunchEventType t2 = createTargetType();
    t2.setName(null);

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_firstParamGetLaunchModeIdReturnsNull() {
    LaunchEventType t1 = createTargetType();
    t1.setLaunchModeId(null);
    LaunchEventType t2 = createTargetType();

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_firstParamGetLaunchTypeIdReturnsNull() {
    LaunchEventType t1 = createTargetType();
    t1.setLaunchTypeId(null);
    LaunchEventType t2 = createTargetType();

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_firstParamGetNameReturnsNull() {
    LaunchEventType t1 = createTargetType();
    t1.setName(null);
    LaunchEventType t2 = createTargetType();

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_secondParamGetLaunchModeIdReturnsNull() {
    LaunchEventType t1 = createTargetType();
    LaunchEventType t2 = createTargetType();
    t2.setLaunchModeId(null);

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_secondParamGetLaunchTypeIdReturnsNull() {
    LaunchEventType t1 = createTargetType();
    LaunchEventType t2 = createTargetType();
    t2.setLaunchTypeId(null);

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Test
  public void testIsMergeable_secondParamGetNameReturnsNull() {
    LaunchEventType t1 = createTargetType();
    LaunchEventType t2 = createTargetType();
    t2.setName(null);

    try {
      assertFalse(merger.isMergeable(t1, t2));
    } catch (Exception e) {
      fail("Should return false instead of exception");
View Full Code Here

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

    }
  }

  @Override
  public void testMerge() throws Exception {
    LaunchEventType t1 = createTargetType();
    t1.setCount(10000);
    t1.setTotalDuration(98340);
    t1.getFilePath().addAll(Arrays.asList(System.currentTimeMillis() + ""));

    LaunchEventType t2 = createTargetType();
    t2.setCount(10000);
    t2.setTotalDuration(98340);
    t2.getFilePath().addAll(Arrays.asList(System.nanoTime() + ""));
    t2.getFilePath().addAll(t1.getFilePath());

    int totalCount = t1.getCount() + t2.getCount();
    long totalDuration = t1.getTotalDuration() + t2.getTotalDuration();
    Set<String> allFileIds = new HashSet<String>(t1.getFilePath());
    allFileIds.addAll(t2.getFilePath());

    LaunchEventType result = merger.merge(t1, t2);
    assertEquals(totalCount, result.getCount());
    assertEquals(totalDuration, result.getTotalDuration());
    assertEquals(allFileIds.size(), result.getFilePath().size());
    assertTrue(allFileIds.containsAll(result.getFilePath()));
  }
View Full Code Here

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

    filePaths.add(new Path("/abc"));
    filePaths.add(new Path("/def"));

    LaunchEvent event = new LaunchEvent(new Interval(time.getMillis(),
        time.getMillis() + duration), launch, config, configType, filePaths);
    LaunchEventType converted = converter.convert(event);

    assertThat(converted.getCount(), is(1));
    assertThat(converted.getTotalDuration(), equalTo(duration));
    assertThat(converted.getLaunchTypeId(), equalTo(configTypeId));
    assertThat(converted.getLaunchModeId(), equalTo(modeId));
    assertThat(converted.getName(), equalTo(configName));
    assertThat(converted.getFilePath().size(), equalTo(filePaths.size()));
    for (IPath path : filePaths) {
      assertTrue(converted.getFilePath().contains(path.toString()));
    }
  }
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.