Improve tests. Add StringPresenter tests.

This commit is contained in:
Christian P. MOMON 2013-08-01 01:43:28 +02:00
parent 8c4d84cce2
commit ecaa38e0d0

View file

@ -1,4 +1,4 @@
package fr.devinsy.xidyn.presenters; package fr.devinsy.xidyn.utils;
import org.fest.assertions.Assertions; import org.fest.assertions.Assertions;
import org.junit.Test; import org.junit.Test;
@ -6,7 +6,7 @@ import org.junit.Test;
/** /**
* *
*/ */
public class PresenterTest public class XidynUtilsTest
{ {
/** /**
* *
@ -16,7 +16,7 @@ public class PresenterTest
{ {
String source = "aaaaa<boDY>hello</Body>zzzzz"; String source = "aaaaa<boDY>hello</Body>zzzzz";
String target = Presenter.extractBodyContent(source); String target = XidynUtils.extractBodyContent(source);
Assertions.assertThat(target).isEqualTo("hello"); Assertions.assertThat(target).isEqualTo("hello");
} }
@ -28,7 +28,7 @@ public class PresenterTest
{ {
String source = "aaaaaaa<boDY>hello</Bod>zzzzz"; String source = "aaaaaaa<boDY>hello</Bod>zzzzz";
String target = Presenter.extractBodyContent(source); String target = XidynUtils.extractBodyContent(source);
Assertions.assertThat(target).isEqualTo(""); Assertions.assertThat(target).isEqualTo("");
} }
@ -40,7 +40,7 @@ public class PresenterTest
{ {
String source = "aaaaa<boDY></BodY>zzzzz"; String source = "aaaaa<boDY></BodY>zzzzz";
String target = Presenter.extractBodyContent(source); String target = XidynUtils.extractBodyContent(source);
Assertions.assertThat(target).isEqualTo(""); Assertions.assertThat(target).isEqualTo("");
} }
@ -52,7 +52,7 @@ public class PresenterTest
{ {
String source = "aaaaa<boDY> hello </BodY>zzzzz"; String source = "aaaaa<boDY> hello </BodY>zzzzz";
String target = Presenter.extractBodyContent(source); String target = XidynUtils.extractBodyContent(source);
Assertions.assertThat(target).isEqualTo("hello"); Assertions.assertThat(target).isEqualTo("hello");
} }
} }