@@ -108,12 +108,12 @@ void versions(TestDb testDb) throws Exception {
108108 "row8-memo" , upTime );
109109
110110 assertThat (row8ValFk .countValues ()).isEqualTo (1 );
111- assertThat (((ComplexValueForeignKeyImpl ) row8ValFk ).getRawValues (). size ()). isEqualTo (1 );
111+ assertThat (((ComplexValueForeignKeyImpl ) row8ValFk ).getRawValues ()). hasSize (1 );
112112
113113 ComplexValueForeignKey row8ValFkAgain = (ComplexValueForeignKey ) verCol .getRowValue (row8 );
114114 assertThat (row8ValFkAgain ).isEqualTo (row8ValFk );
115- assertThat (row8ValFkAgain . hashCode ()). isEqualTo (row8ValFk . hashCode () );
116- assertThat (row8ValFk ).isNotEqualTo ( null );
115+ assertThat (row8ValFkAgain ). hasSameHashCodeAs (row8ValFk );
116+ assertThat (row8ValFk ).isNotNull ( );
117117 assertThat ((Object ) row8ValFk ).isNotEqualTo ("not a complex value fk" );
118118
119119 assertThatThrownBy (row8ValFk ::getAttachments ).isInstanceOf (UnsupportedOperationException .class );
@@ -126,7 +126,7 @@ void versions(TestDb testDb) throws Exception {
126126 LocalDateTime ldtUpTime = LocalDateTime .now ();
127127 row9ValFk .addVersion ("row9-memo" , ldtUpTime );
128128 List <Version > row9Versions = row9ValFk .getVersions ();
129- assertThat (row9Versions . size ()). isEqualTo (1 );
129+ assertThat (row9Versions ). hasSize (1 );
130130 assertThat (row9Versions .get (0 ).getValue ()).isEqualTo ("row9-memo" );
131131 // db is configured for DateTimeType.DATE, so the value round-trips as a Date
132132 // regardless of which addVersion overload was used to write it
@@ -254,9 +254,9 @@ void attachments(TestDb testDb) throws Exception {
254254 assertThat (updated .getFileName ()).isEqualTo ("some_data.zip" );
255255 assertThat (updated .getFileData ()).containsExactly (newBytes );
256256 byte [] encBytes = updated .getEncodedFileData ();
257- assertThat (encBytes . length ). isEqualTo (newBytes .length + 28 );
257+ assertThat (encBytes ). hasSize (newBytes .length + 28 );
258258 ByteBuffer bb = PageChannel .wrap (encBytes );
259- assertThat (bb .getInt ()).isEqualTo ( 0 );
259+ assertThat (bb .getInt ()).isZero ( );
260260 assertThat (ByteUtil .matchesRange (bb , 28 , newBytes )).isTrue ();
261261
262262 updated .delete ();
@@ -376,7 +376,7 @@ void unsupported(TestDb testDb) throws Exception {
376376 assertThatThrownBy (row3ValFk ::getVersions ).isInstanceOf (UnsupportedOperationException .class );
377377 assertThatThrownBy (row3ValFk ::getAttachments ).isInstanceOf (UnsupportedOperationException .class );
378378 assertThatThrownBy (row3ValFk ::getMultiValues ).isInstanceOf (UnsupportedOperationException .class );
379- assertThat (row3ValFk .countValues ()).isEqualTo ( 0 );
379+ assertThat (row3ValFk .countValues ()).isZero ( );
380380 }
381381 }
382382
@@ -387,10 +387,10 @@ private static void checkVersions(
387387
388388 List <Version > versions = complexValueFk .getVersions ();
389389 if (versionInfos .length == 0 ) {
390- assertThat (versions . isEmpty ()). isTrue ();
390+ assertThat (versions ). isEmpty ();
391391 assertThat (curValue ).isNull ();
392392 } else {
393- assertThat (versions . size ()). isEqualTo (versionInfos .length / 2 );
393+ assertThat (versions ). hasSize (versionInfos .length / 2 );
394394 assertThat (versions .get (0 ).getValue ()).isEqualTo (curValue );
395395 for (int i = 0 ; i < versionInfos .length ; i += 2 ) {
396396 String value = (String ) versionInfos [i ];
@@ -409,9 +409,9 @@ private static void checkAttachments(
409409
410410 List <Attachment > attachments = complexValueFk .getAttachments ();
411411 if (fileNames .length == 0 ) {
412- assertThat (attachments . isEmpty ()). isTrue ();
412+ assertThat (attachments ). isEmpty ();
413413 } else {
414- assertThat (attachments . size ()). isEqualTo (fileNames .length );
414+ assertThat (attachments ). hasSize (fileNames .length );
415415 for (int i = 0 ; i < fileNames .length ; i ++) {
416416 String fname = fileNames [i ];
417417 Attachment a = attachments .get (i );
@@ -430,9 +430,9 @@ private static void checkMultiValues(
430430
431431 List <SingleValue > values = complexValueFk .getMultiValues ();
432432 if (expectedValues .length == 0 ) {
433- assertThat (values . isEmpty ()). isTrue ();
433+ assertThat (values ). isEmpty ();
434434 } else {
435- assertThat (values . size ()). isEqualTo (expectedValues .length );
435+ assertThat (values ). hasSize (expectedValues .length );
436436 for (int i = 0 ; i < expectedValues .length ; i ++) {
437437 Object value = expectedValues [i ];
438438 SingleValue v = values .get (i );
@@ -448,16 +448,16 @@ private static void checkUnsupportedValues(
448448
449449 List <UnsupportedValue > values = complexValueFk .getUnsupportedValues ();
450450 if (expectedValues .length == 0 ) {
451- assertThat (values . isEmpty ()). isTrue ();
451+ assertThat (values ). isEmpty ();
452452 } else {
453- assertThat (values . size ()). isEqualTo (expectedValues .length );
453+ assertThat (values ). hasSize (expectedValues .length );
454454 for (int i = 0 ; i < expectedValues .length ; i ++) {
455455 String value = expectedValues [i ];
456456 UnsupportedValue v = values .get (i );
457- assertThat (v .getValues (). size ()). isEqualTo (1 );
457+ assertThat (v .getValues ()). hasSize (1 );
458458 Object rv = v .get ("Value" );
459459 assertThat (ColumnImpl .isRawData (rv )).isTrue ();
460- assertThat (rv . toString ()). isEqualTo (value );
460+ assertThat (rv ). hasToString (value );
461461 }
462462 }
463463 }
0 commit comments