Examples of UndefinedPerspectiveDescriptor


Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

  IPerspectiveDescriptor perspective;

  @Test
  public void getForegroundShouldReturnDarkGrayForAnUndefinedPerspective() {
    IPerspectiveDescriptor undefined = new UndefinedPerspectiveDescriptor("abc");
    assertThat(provider.getForeground(undefined), equalTo(PlatformUI
        .getWorkbench().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY)));
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

*/
public class UndefinedPerspectiveDescriptorTest {
 
  @Test(expected = NullPointerException.class)
  public void testConstructor_idNull() {
    new UndefinedPerspectiveDescriptor(null);
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

  }

  @Test
  public void testGetId() {
    String id = "adf23";
    UndefinedPerspectiveDescriptor per = new UndefinedPerspectiveDescriptor(id);
    assertEquals(id, per.getId());
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

  }

  @Test
  public void testGetLabel() {
    String id = "a12df23";
    UndefinedPerspectiveDescriptor per = new UndefinedPerspectiveDescriptor(id);
    assertEquals(id, per.getLabel());
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

    assertEquals(id, per.getLabel());
  }
 
  @Test
  public void testHashCode() {
    UndefinedPerspectiveDescriptor des = new UndefinedPerspectiveDescriptor("1");
    assertEquals(des.getId().hashCode(), des.hashCode());
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

    assertEquals(des.getId().hashCode(), des.hashCode());
  }

  @Test
  public void testEquals() {
    UndefinedPerspectiveDescriptor d1 = new UndefinedPerspectiveDescriptor("1");
    UndefinedPerspectiveDescriptor d2 = new UndefinedPerspectiveDescriptor("2");
    assertFalse(d1.equals(d2));
    assertTrue(d1.equals(d1));
    assertFalse(d1.equals(null));
   
    d2 = new UndefinedPerspectiveDescriptor(d1.getId());
    assertTrue(d1.equals(d2));
  }
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

          break;
        case PERSPECTIVE:
          String id = data.get(IPerspectiveData.PERSPECTIVE_ID);
          IPerspectiveDescriptor p = registry.findPerspectiveWithId(id);
          if (p == null) {
            p = new UndefinedPerspectiveDescriptor(id);
          }
          segments.add(p);
          break;
        default:
          break;
View Full Code Here

Examples of rabbit.ui.internal.util.UndefinedPerspectiveDescriptor

  }

  @Test
  public void shouldBuildAPathWithUndefinedPerspectiveId() {
    IPerspectiveDescriptor undefined =
        new UndefinedPerspectiveDescriptor("abc123");
    ICategory[] categories = {
        Category.DATE, Category.WORKSPACE, Category.PERSPECTIVE};
    List<TreePath> expected = asList(newPath(date, ws, undefined, duration));

    IPerspectiveData data = mock(IPerspectiveData.class);
    given(data.get(IPerspectiveData.DATE)).willReturn(date);
    given(data.get(IPerspectiveData.DURATION)).willReturn(duration);
    given(data.get(IPerspectiveData.WORKSPACE)).willReturn(ws);
    given(data.get(IPerspectiveData.PERSPECTIVE_ID)).willReturn(
        undefined.getId());

    ICategoryProvider provider = mock(ICategoryProvider.class);
    given(provider.getSelected()).willReturn(asList(categories));
    ITreePathBuilder builder = create(provider);
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.