Package br.com.caelum.tubaina

Examples of br.com.caelum.tubaina.TubainaBuilder


    Assert.assertEquals(CodeChunk.class, chunks.get(0).getClass());
  }

  @Test
    public void shouldThrowExeptionWhenMaxCodeWidthIsExceeded() throws Exception {
      TubainaBuilder builder = new TubainaBuilder(ParseType.LATEX);
        builder.codeLength(10);
      String original = "[code java]12345678901[/code]";
        Assert.assertTrue(replacer.accepts(original));
        try {
            replacer.execute(original, chunks);
            Assert.fail("should throw exception");
        } catch (TubainaException e) {
        } finally {
            builder.codeLength(10000);
        }
    }
View Full Code Here


        }
    }
 
  @Test
  public void shouldThrowExeptionWithCodeWithTabs() throws Exception {
      TubainaBuilder builder = new TubainaBuilder(ParseType.LATEX);
      String tabReplacement = "    ";
        builder.codeLength(6 + tabReplacement.length());
      String original = "[code java]5\t678901[/code]";
      Assert.assertTrue(replacer.accepts(original));
      try {
          replacer.execute(original, chunks);
          Assert.fail("should throw exception");
      } catch (TubainaException e) {
      } finally {
          builder.codeLength(10000);
      }
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.tubaina.TubainaBuilder

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.