Add tests.
This commit is contained in:
parent
ee3237faaa
commit
9980de63da
4 changed files with 28 additions and 29 deletions
20
test/Foo.java
Normal file
20
test/Foo.java
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
import fr.devinsy.xidyn.utils.XidynUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class Foo
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static void main(final String[] args) throws Exception
|
||||||
|
{
|
||||||
|
String source = "<div><h1>toto</h1><span id='titi'>blank</span></div>";
|
||||||
|
|
||||||
|
Document dom = XidynUtils.buildDom(source);
|
||||||
|
}
|
||||||
|
}
|
|
@ -31,7 +31,7 @@ public class DomPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testDynamize01() throws Exception
|
public void testDynamize01() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = new StringPresenter(source).dynamize().toString();
|
String target = new StringPresenter(source).dynamize().toString();
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class DomPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testDynamize02() throws Exception
|
public void testDynamize02() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = new StringPresenter(source).dynamize(null).toString();
|
String target = new StringPresenter(source).dynamize(null).toString();
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class DomPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testDynamize03() throws Exception
|
public void testDynamize03() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = new StringPresenter(source).dynamize(new TagDataManager()).toString();
|
String target = new StringPresenter(source).dynamize(new TagDataManager()).toString();
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class DomPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testStaticDynamize01() throws Exception
|
public void testStaticDynamize01() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = StringPresenter.dynamize(source, null).toString();
|
String target = StringPresenter.dynamize(source, null).toString();
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public class DomPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testStaticDynamize02() throws Exception
|
public void testStaticDynamize02() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = StringPresenter.dynamize(source, new TagDataManager()).toString();
|
String target = StringPresenter.dynamize(source, new TagDataManager()).toString();
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class StringPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testDynamize03() throws Exception
|
public void testDynamize03() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = new StringPresenter(source).dynamize(new TagDataManager()).toString();
|
String target = new StringPresenter(source).dynamize(new TagDataManager()).toString();
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class StringPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testStaticDynamize01() throws Exception
|
public void testStaticDynamize01() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = StringPresenter.dynamize(source, null).toString();
|
String target = StringPresenter.dynamize(source, null).toString();
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public class StringPresenterTest
|
||||||
@Test
|
@Test
|
||||||
public void testStaticDynamize02() throws Exception
|
public void testStaticDynamize02() throws Exception
|
||||||
{
|
{
|
||||||
String source = "aaaaa<body>hello</body>zzzzz";
|
String source = "aaaaa<div>hello</div>zzzzz";
|
||||||
|
|
||||||
String target = StringPresenter.dynamize(source, new TagDataManager()).toString();
|
String target = StringPresenter.dynamize(source, new TagDataManager()).toString();
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
package one;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class Foo2Test
|
|
||||||
{
|
|
||||||
// private Logger logger =
|
|
||||||
// LoggerFactory.getLogger(PdfGenerationAmqpServiceInjectedTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void test2a()
|
|
||||||
{
|
|
||||||
// logger.debug("===== test starting...");
|
|
||||||
|
|
||||||
// logger.debug("===== test done.");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in a new issue