Skip to content

Commit c825d2e

Browse files
author
ipolevoy
committed
#752 Migrate build from Jenkins to TravisCI
1 parent d59ce52 commit c825d2e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

activejdbc/src/test/java/org/javalite/activejdbc/OffsetLimitTest.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import org.javalite.activejdbc.Model;
2121
import org.javalite.activejdbc.test.ActiveJDBCTest;
2222
import org.javalite.activejdbc.test_models.Page;
23+
import org.javalite.test.SystemStreamUtil;
24+
import org.junit.After;
2325
import org.junit.Before;
2426
import org.junit.Test;
2527

@@ -33,20 +35,23 @@ public class OffsetLimitTest extends ActiveJDBCTest {
3335

3436
@Before
3537
public void setup() throws Exception {
38+
SystemStreamUtil.replaceOut();
3639
deleteAndPopulateTable("pages");
3740
for (int i = 1; i <= 1000; i++) {
3841
Page.create("description", "description: " + i, "word_count", 11).saveIt();
3942
}
4043
}
4144

45+
@After
46+
public void tearDown(){
47+
SystemStreamUtil.restoreSystemOut();
48+
}
49+
4250
@Test
4351
public void testAll() {
4452

45-
List<Page> pages = Page.findAll().orderBy("id asc");
46-
47-
4853
//offset and limit
49-
pages = Page.findAll().offset(100).limit(20).orderBy("id");
54+
List<Page> pages = Page.findAll().offset(100).limit(20).orderBy("id");
5055
a(pages.size()).shouldBeEqual(20);
5156
a(pages.get(0).get("description")).shouldBeEqual("description: 101");
5257
a(pages.get(19).get("description")).shouldBeEqual("description: 120");

0 commit comments

Comments
 (0)