Package br.com.caelum.tubaina.parser.html.kindle

Source Code of br.com.caelum.tubaina.parser.html.kindle.BoxTagTest

package br.com.caelum.tubaina.parser.html.kindle;

import org.junit.Assert;
import org.junit.Test;

import br.com.caelum.tubaina.chunk.BoxChunk;

public class BoxTagTest extends AbstractTagTest {

    @Test
    public void testBox() {
        BoxChunk chunk = new BoxChunk("Título do Box", text("Texto do Box"));
    String result = getContent(chunk);
        Assert.assertEquals(BoxTag.BEGIN + BoxTag.TITLE_BEGIN + "Título do Box" + BoxTag.TITLE_END
                + "Texto do Box" + BoxTag.END, result);
    }

    @Test
    public void testBoxWithMultilineContent() {
      BoxChunk chunk = new BoxChunk("Título do Box", text("Texto do Box\n blablabla"));
        String result = getContent(chunk);
        Assert.assertEquals(BoxTag.BEGIN + BoxTag.TITLE_BEGIN + "Título do Box"
                + BoxTag.TITLE_END + "Texto do Box\n blablabla" + BoxTag.END, result);
    }

}
TOP

Related Classes of br.com.caelum.tubaina.parser.html.kindle.BoxTagTest

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.