X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Ftest%2FBasicSupportTest.java;h=645d042e74467a3b8a2497f9b287fd1200b39a4b;hb=ed08c17162aa8cbdb0cbe6a6045815b987236b9f;hp=f989663e24b0ae142f03448c1dc7d592b7204ba6;hpb=a4e45cfdcb46ecab5ac0a95fe4b30edd3eae431d;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/test/BasicSupportTest.java b/src/be/nikiroo/fanfix/test/BasicSupportTest.java index f989663..645d042 100644 --- a/src/be/nikiroo/fanfix/test/BasicSupportTest.java +++ b/src/be/nikiroo/fanfix/test/BasicSupportTest.java @@ -17,6 +17,7 @@ import be.nikiroo.fanfix.data.Story; import be.nikiroo.fanfix.supported.BasicSupport; import be.nikiroo.fanfix.supported.BasicSupport.SupportType; import be.nikiroo.utils.IOUtils; +import be.nikiroo.utils.Progress; import be.nikiroo.utils.test.TestCase; import be.nikiroo.utils.test.TestLauncher; @@ -60,13 +61,13 @@ public class BasicSupportTest extends TestLauncher { List paras = null; - paras = support.makeParagraphs(null, ""); + paras = support.makeParagraphs(null, "", null); assertEquals( "An empty content should not generate paragraphs", 0, paras.size()); paras = support.makeParagraphs(null, - "Line 1

Line 2

Line 3

"); + "Line 1

Line 2

Line 3

", null); assertEquals(5, paras.size()); assertEquals("Line 1", paras.get(0).getContent()); assertEquals(ParagraphType.BLANK, paras.get(1) @@ -77,7 +78,7 @@ public class BasicSupportTest extends TestLauncher { assertEquals("Line 3", paras.get(4).getContent()); paras = support.makeParagraphs(null, - "

Line1

Line2

Line3

"); + "

Line1

Line2

Line3

", null); assertEquals(6, paras.size()); } }); @@ -95,34 +96,39 @@ public class BasicSupportTest extends TestLauncher { List paras = null; paras = support - .makeParagraphs(null, - "

Line1

Line2

Line3

"); + .makeParagraphs( + null, + "

Line1

Line2

Line3

", + null); assertEquals(5, paras.size()); paras = support - .makeParagraphs(null, - "

Line1

Line2

Line3

* * *"); + .makeParagraphs( + null, + "

Line1

Line2

Line3

* * *", + null); assertEquals(5, paras.size()); - paras = support.makeParagraphs(null, "1

* * *

2"); + paras = support.makeParagraphs(null, "1

* * *

2", + null); assertEquals(3, paras.size()); assertEquals(ParagraphType.BREAK, paras.get(1) .getType()); paras = support.makeParagraphs(null, - "1


* * *

2"); + "1


* * *

2", null); assertEquals(3, paras.size()); assertEquals(ParagraphType.BREAK, paras.get(1) .getType()); paras = support.makeParagraphs(null, - "1

* * *


2"); + "1

* * *


2", null); assertEquals(3, paras.size()); assertEquals(ParagraphType.BREAK, paras.get(1) .getType()); paras = support.makeParagraphs(null, - "1



* * *


2"); + "1



* * *


2", null); assertEquals(3, paras.size()); assertEquals(ParagraphType.BREAK, paras.get(1) .getType()); @@ -417,21 +423,21 @@ public class BasicSupportTest extends TestLauncher { @Override protected List> getChapters(URL source, - InputStream in) throws IOException { + InputStream in, Progress pg) throws IOException { return null; } @Override protected String getChapterContent(URL source, InputStream in, - int number) throws IOException { + int number, Progress pg) throws IOException { return null; } @Override // and make it public! - public List makeParagraphs(URL source, String content) - throws IOException { - return super.makeParagraphs(source, content); + public List makeParagraphs(URL source, String content, + Progress pg) throws IOException { + return super.makeParagraphs(source, content, pg); } @Override