2929
3030package net .imagej .ops .image .ascii ;
3131
32- import static org .junit .Assert .assertTrue ;
32+ import static org .junit .Assert .assertEquals ;
33+ import static org .junit .Assert .assertNotEquals ;
3334
3435import net .imagej .ops .AbstractOpTest ;
3536import net .imglib2 .img .Img ;
@@ -64,9 +65,9 @@ public void testDefaultASCII() {
6465 final String ascii = (String ) ops .run (DefaultASCII .class , img );
6566 for (int i = 0 ; i < len ; i ++) {
6667 for (int j = 0 ; j < width ; j ++) {
67- assertTrue (ascii .charAt (i * (width + 1 ) + j ) == CHARS .charAt (i ));
68+ assertEquals (ascii .charAt (i * (width + 1 ) + j ), CHARS .charAt (i ));
6869 }
69- assertTrue (ascii .charAt (i * (width + 1 ) + width ) == '\n' );
70+ assertEquals (ascii .charAt (i * (width + 1 ) + width ), '\n' );
7071 }
7172 }
7273
@@ -89,16 +90,16 @@ public void testASCIIMinMax() {
8990 final String ascii = (String ) ops .run (DefaultASCII .class , img , min , max );
9091 for (int i = 0 ; i < len ; i ++) {
9192 for (int j = 0 ; j < width ; j ++) {
92- assertTrue (ascii .charAt (i * (width + 1 ) + j ) == CHARS .charAt (i ));
93+ assertEquals (ascii .charAt (i * (width + 1 ) + j ), CHARS .charAt (i ));
9394 }
94- assertTrue (ascii .charAt (i * (width + 1 ) + width ) == '\n' );
95+ assertEquals (ascii .charAt (i * (width + 1 ) + width ), '\n' );
9596 }
9697
9798 // make sure that the clamped ASCII string is not equivalent to the
9899 // unclamped String
99100 final String asciiUnclamped = (String ) ops .run (DefaultASCII .class , img );
100101
101- assertTrue (asciiUnclamped != ascii );
102+ assertNotEquals (asciiUnclamped , ascii );
102103
103104 }
104105}
0 commit comments