Package info.bliki.wiki.model

Examples of info.bliki.wiki.model.SemanticRelation


    assertEquals(
        "\n"
            + "<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" title=\"link\">alternate text</a> appear in place of the link.</p>",
        wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here


    assertEquals(
        "\n"
            + "<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" title=\"Link\">alternate text</a> appear in place of the link.</p>",
        wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link.", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  public void testLink04() {

    assertEquals("\n<p>To hide the property  from appearing at all</p>", wikiModel
        .render("To hide the property [[    example relation::link   | ]] from appearing at all", false));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  public void testLink01() {

    assertEquals("\n" + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" id=\"w\">Germany</a>.</p>",
        wikiModel.render("Berlin is the capital of [[Is capital of::Germany]]."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("Is capital of"));
    assertTrue(rel.getValue().equals("Germany"));
  }
View Full Code Here

 
  public void testLink03() {

    assertEquals("\n<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" id=\"w\">alternate text</a> appear in place of the link.</p>", wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link."));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

  }
  public void testLink04() {

    assertEquals("\n<p>To hide the property  from appearing at all</p>", wikiModel.render("To hide the property [[    example relation::link   | ]] from appearing at all"));
    List<SemanticRelation> list = wikiModel.getSemanticRelations();
    SemanticRelation rel = list.get(0);
    assertTrue(rel.getRelation().equals("example relation"));
    assertTrue(rel.getValue().equals("link"));
  }
View Full Code Here

    @Test public void testLink01() {

        assertThat(wikiModel.render("Berlin is the capital of [[Is capital of::Germany]].", false)).isEqualTo("\n"
                + "<p>Berlin is the capital of <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Germany\" title=\"Germany\">Germany</a>.</p>");
        List<SemanticRelation> list = wikiModel.getSemanticRelations();
        SemanticRelation rel = list.get(0);
        assertThat(rel.getRelation()).isEqualTo("Is capital of");
        assertThat(rel.getValue()).isEqualTo("Germany");
    }
View Full Code Here

    @Test public void testLink03() {

        assertThat(wikiModel.render("Make [[example relation::link|alternate text]] appear in place of the link.", false)).isEqualTo("\n"
                + "<p>Make <a class=\"interwiki\" href=\"http://www.bliki.info/wiki/Link\" title=\"Link\">alternate text</a> appear in place of the link.</p>");
        List<SemanticRelation> list = wikiModel.getSemanticRelations();
        SemanticRelation rel = list.get(0);
        assertThat(rel.getRelation()).isEqualTo("example relation");
        assertThat(rel.getValue()).isEqualTo("link");
    }
View Full Code Here

    @Test public void testLink04() {

        assertThat(wikiModel
                .render("To hide the property [[    example relation::link   | ]] from appearing at all", false)).isEqualTo("\n<p>To hide the property  from appearing at all</p>");
        List<SemanticRelation> list = wikiModel.getSemanticRelations();
        SemanticRelation rel = list.get(0);
        assertThat(rel.getRelation()).isEqualTo("example relation");
        assertThat(rel.getValue()).isEqualTo("link");
    }
View Full Code Here

TOP

Related Classes of info.bliki.wiki.model.SemanticRelation

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.