Package org.sonar.api.source

Examples of org.sonar.api.source.Highlightable


  public void should_load_default_perspective() throws Exception {
    Resource file = new File("foo.c").setEffectiveKey("myproject:path/to/foo.c");
    Component component = new ResourceComponent(file);

    HighlightableBuilder builder = new HighlightableBuilder(cache);
    Highlightable perspective = builder.loadPerspective(Highlightable.class, component);

    assertThat(perspective).isNotNull().isInstanceOf(DefaultHighlightable.class);
    assertThat(perspective.component()).isSameAs(component);
  }
View Full Code Here


  @Test
  public void project_should_not_be_highlightable() {
    Component component = new ResourceComponent(new Project("struts").setEffectiveKey("org.struts"));

    HighlightableBuilder builder = new HighlightableBuilder(cache);
    Highlightable perspective = builder.loadPerspective(Highlightable.class, component);

    assertThat(perspective).isNull();
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.source.Highlightable

Copyright © 2018 www.massapicom. 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.