Examples of LaunchConfigurationDescriptor


Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

    assertThat(actual.get(ILaunchData.WORKSPACE), is(expectedWs));
    assertThat(actual.get(ILaunchData.COUNT), is(expected.getCount()));
    assertThat(actual.get(ILaunchData.DURATION).getMillis(),
        is(expected.getTotalDuration()));

    LaunchConfigurationDescriptor config = actual.get(ILaunchData.LAUNCH_CONFIG);
    assertThat(config.getLaunchModeId(), is(expected.getLaunchModeId()));
    assertThat(config.getLaunchTypeId(), is(expected.getLaunchTypeId()));
    assertThat(config.getLaunchName(), is(expected.getName()));

    Set<IFile> files = actual.get(ILaunchData.FILES);
    Collection<String> paths = Collections2.transform(files,
        new Function<IFile, String>() {
          @Override
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

  @Override
  protected ILaunchData createDataNode(LocalDate date, WorkspaceStorage ws,
      LaunchEventType type) throws Exception {
    Duration duration = new Duration(type.getTotalDuration());
    LaunchConfigurationDescriptor config = new LaunchConfigurationDescriptor(
        type.getName(), type.getLaunchModeId(), type.getLaunchTypeId());
    Set<IFile> files = newHashSet();
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    for (String str : type.getFilePath()) {
      try {
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

    String name = "name";
    String mode = "mode";
    String type = "type";
    int hashcode = Objects.hashCode(name, mode, type);
   
    LaunchConfigurationDescriptor des = createDescriptor(name, mode, type);
    assertEquals(hashcode, des.hashCode());
  }
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

  public void testEquals() {
    String name = "name";
    String mode = "mode";
    String type = "type";
   
    LaunchConfigurationDescriptor des1 = createDescriptor(name, mode, type);
    assertFalse(des1.equals(null));
    assertFalse(des1.equals(new Object()));
    assertTrue(des1.equals(des1));
   
    LaunchConfigurationDescriptor des2 = createDescriptor(name, mode, type);
    assertTrue(des1.equals(des2));
   
    des2 = createDescriptor(name + ".", mode, type);
    assertFalse(des1.equals(des2));
   
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

   * @param typeId The type ID of the descriptor.
   * @return A descriptor created using the parameters.
   */
  protected LaunchConfigurationDescriptor createDescriptor(String name,
      String modeId, String typeId) {
    return new LaunchConfigurationDescriptor(name, modeId, typeId);
  }
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

  @Before
  public void before() {
    count = 10;
    date = new LocalDate();
    workspace = new WorkspaceStorage(new Path(""), new Path(""));
    config = new LaunchConfigurationDescriptor("a", "b", "c");
    duration = new Duration(10);
    files = Sets.newHashSet(mock(IFile.class), mock(IFile.class));
  }
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

      for (ICategory category : provider.getSelected()) {
        if (!(category instanceof Category)) {
          continue;
        }

        LaunchConfigurationDescriptor d = data.get(ILaunchData.LAUNCH_CONFIG);
        switch ((Category) category) {
        case LAUNCH:
          segments.add(new LaunchName(d.getLaunchName(), d.getLaunchTypeId()));
          break;
        case LAUNCH_MODE: {
          String id = d.getLaunchModeId();
          ILaunchMode mode = manager.getLaunchMode(id);
          if (mode == null) {
            mode = new UndefinedLaunchMode(id);
          }
          segments.add(mode);
          break;
        }
        case LAUNCH_TYPE: {
          String id = d.getLaunchTypeId();
          ILaunchConfigurationType t = manager.getLaunchConfigurationType(id);
          if (t == null) {
            t = new UndefinedLaunchConfigurationType(id);
          }
          segments.add(t);
View Full Code Here

Examples of rabbit.data.access.model.LaunchConfigurationDescriptor

    duration = new Duration(101);
    launch = new LaunchName("hello", type.getIdentifier());
    ws = new WorkspaceStorage(new Path("/a"), new Path(".a"));
    fileHasParent = root.getFile(new Path("/project/folder/folder1/file.txt"));
    fileHasNoParent = root.getFile(new Path("/project/file.txt"));
    configDes = new LaunchConfigurationDescriptor(
        launch.getLaunchName(), mode.getIdentifier(), type.getIdentifier());

    dataNode = mock(ILaunchData.class);
    given(dataNode.get(ILaunchData.COUNT)).willReturn(count);
    given(dataNode.get(ILaunchData.DATE)).willReturn(date);
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.