@@ -49,12 +49,12 @@ private void checkWithLazyLoadingOnBuiltInMany() {
4949
5050 // first one is the main query and others are lazy loading queries
5151 List <String > loggedSql = LoggedSql .stop ();
52- assertTrue (loggedSql .size () > 1 );
52+ assertThat (loggedSql .size ()). isGreaterThan ( 1 );
5353
5454 String lazyLoadSql = loggedSql .get (1 );
5555 // contains the foreign key back to the parent bean (t0.order_id)
56- assertTrue (trimSql (lazyLoadSql , 2 ).contains ("select t0.order_id, t0.id" ) );
57- assertTrue (lazyLoadSql .contains ("order by t0.order_id, t0.id, t0.order_qty, t0.cretime desc" ) );
56+ assertThat (trimSql (lazyLoadSql , 2 )) .contains (" t0.order_id, t0.id" );
57+ assertThat (lazyLoadSql ) .contains ("order by t0.order_id, t0.id, t0.order_qty, t0.cretime desc" );
5858
5959 }
6060
@@ -77,8 +77,8 @@ private void checkWithBuiltInMany() {
7777 String sql = query .getGeneratedSql ();
7878
7979 // t0.id inserted into the middle of the order by
80- assertTrue (sql .contains ("order by t1.name desc, t0.id, t2.id asc" ) );
81- assertTrue (sql .contains ("t2.id asc, t2.order_qty asc, t2.cretime desc" ) );
80+ assertThat (sql ) .contains ("order by t1.name desc, t0.id, t2.id asc" );
81+ assertThat (sql ) .contains ("t2.id asc, t2.order_qty asc, t2.cretime desc" );
8282 }
8383
8484 private void checkAppendId () {
@@ -90,7 +90,7 @@ private void checkAppendId() {
9090 String sql = query .getGeneratedSql ();
9191
9292 // append the id to ensure ordering of root level objects
93- assertTrue (sql .contains ("order by t1.name desc, t0.id" ) );
93+ assertThat (sql ) .contains ("order by t1.name desc, t0.id" );
9494 }
9595
9696 private void checkNone () {
@@ -103,8 +103,8 @@ private void checkNone() {
103103
104104 // no need to append id to order by as there is no 'many' included in the
105105 // query
106- assertTrue (sql .contains ("order by t1.name desc" ) );
107- assertTrue (! sql . contains ("order by t1.name desc," ) );
106+ assertThat (sql ) .contains ("order by t1.name desc" );
107+ assertThat ( sql ). doesNotContain ("order by t1.name desc," );
108108 }
109109
110110 private void checkBoth () {
@@ -116,7 +116,7 @@ private void checkBoth() {
116116
117117 String sql = query .getGeneratedSql ();
118118 // insert id into the middle of the order by
119- assertTrue (sql .contains ("order by t1.name, t0.id, t2.ship_time desc" ) );
119+ assertThat (sql ) .contains ("order by t1.name, t0.id, t2.ship_time desc" );
120120 }
121121
122122 private void checkPrepend () {
@@ -128,7 +128,7 @@ private void checkPrepend() {
128128
129129 String sql = query .getGeneratedSql ();
130130 // prepend id in order by
131- assertTrue (sql .contains ("order by t0.id, t1.ship_time desc" ) );
131+ assertThat (sql ) .contains ("order by t0.id, t1.ship_time desc" );
132132 }
133133
134134 private void checkAlreadyIncluded () {
@@ -140,7 +140,7 @@ private void checkAlreadyIncluded() {
140140
141141 String sql = query .getGeneratedSql ();
142142 // prepend id in order by
143- assertTrue (sql .contains ("order by t0.id, t1.ship_time desc" ) );
143+ assertThat (sql ) .contains ("order by t0.id, t1.ship_time desc" );
144144 }
145145
146146 private void checkAlreadyIncluded2 () {
0 commit comments