コード例 #1
0
 @Test
 public void renderStartPage() {
   Szenario szenario = szenario("s1");
   AnwenderloesungRenderingContainer container =
       new AnwenderloesungRenderingContainer(
           "id", szenario, new SzenarioUserData(), Arrays.asList("de"), true, true, true, true);
   String x =
       renderer.renderStartPage(
           container, new LocalizationEngine(localizationEngineSupport, "model", "de"));
   assertTrue(x, x.contains(szenario.getId()));
   htmlChecker.checkHtmlString(x);
 }
コード例 #2
0
  @Test
  public void renderStartPageWithXMLModel() {
    Szenario szenario = szenario("s1");
    SzenarioUserData szenarioUserData = new SzenarioUserData();
    szenarioUserData.setProjektname("projekt abc");
    AnwenderloesungRenderingContainer container =
        new AnwenderloesungRenderingContainer(
            "id", szenario, szenarioUserData, Arrays.asList("de"), true, true, true, true);
    String x =
        renderer.renderStartPage(
            container, new LocalizationEngine(localizationEngineSupport, "model", "de"));
    assertTrue(x, x.contains("projekt abc"));
    assertTrue(x, x.toLowerCase().contains("xml"));

    assertFalse(x, x.contains(szenario.getId()));
    htmlChecker.checkHtmlString(x);
  }