1919import org .fugerit .java .doc .lib .simpletable .model .SimpleCell ;
2020import org .fugerit .java .doc .lib .simpletable .model .SimpleRow ;
2121import org .fugerit .java .doc .lib .simpletable .model .SimpleTable ;
22- import org .junit .Assert ;
23- import org .junit .Test ;
22+ import org .junit .jupiter . api . Assertions ;
23+ import org .junit .jupiter . api . Test ;
2424
25- public class TestSimpleTable {
25+ class TestSimpleTable {
2626
2727 private void testTable ( SimpleTable table , SimpleTableHelper helper ) {
2828 table .addRow ( helper .newHeaderRow ( "H1" , "H2" ) );
@@ -39,51 +39,51 @@ private void testTable( SimpleTable table, SimpleTableHelper helper ) {
3939 SafeFunction .apply ( () -> {
4040 try ( ByteArrayOutputStream baos = new ByteArrayOutputStream () ) {
4141 SimpleTableDocConfig .newConfigLatest ().processSimpleTable ( table , FreeMarkerHtmlTypeHandler .HANDLER , baos );
42- Assert .assertTrue ( baos .toByteArray ().length > 0 );
42+ Assertions .assertTrue ( baos .toByteArray ().length > 0 );
4343 }
4444 } );
45- Assert .assertThrows ( DocException .class , () -> {
45+ Assertions .assertThrows ( DocException .class , () -> {
4646 try ( ByteArrayOutputStream baos = new ByteArrayOutputStream () ) {
4747 SimpleTableDocConfig .newConfigLatest ().processSimpleTable ( table , new FailTypeHandler (), baos );
48- Assert .assertTrue ( baos .toByteArray ().length > 0 );
48+ Assertions .assertTrue ( baos .toByteArray ().length > 0 );
4949 }
5050 } );
5151 }
5252
5353 @ Test
54- public void testHelper () {
54+ void testHelper () {
5555 Integer defaultBorder = 0 ;
5656 SimpleTableHelper helper = SimpleTableFacade .newHelper ().withDefaultBorderWidth ( defaultBorder );
57- Assert .assertEquals ( defaultBorder , helper .getDefaultBorderWidth () );
57+ Assertions .assertEquals ( defaultBorder , helper .getDefaultBorderWidth () );
5858 List <Integer > lcw = new ArrayList <Integer >();
59- Assert .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( lcw ) );
60- Assert .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable () );
59+ Assertions .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( lcw ) );
60+ Assertions .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable () );
6161 List <Integer > colWidths = null ;
62- Assert .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidths ) );
62+ Assertions .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidths ) );
6363 Integer [] colWidthsA = null ;
64- Assert .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidthsA ) );
64+ Assertions .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidthsA ) );
6565 Integer [] colWidths50 = { 20 , 30 };
66- Assert .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidths50 ) );
66+ Assertions .assertThrows ( ConfigRuntimeException .class , () -> helper .newTable ( colWidths50 ) );
6767 // new table ok
68- Assert .assertNotNull ( helper .newTableSingleColumn () );
68+ Assertions .assertNotNull ( helper .newTableSingleColumn () );
6969 SimpleTable table = helper .newTable ( 50 , 50 );
7070 this .testTable (table , helper );
7171 }
7272
7373 @ Test
74- public void testFacade () {
75- Assert .assertNotNull ( SimpleTableFacade .newTable ( 100 ) );
76- Assert .assertNotNull ( SimpleTableFacade .newTableSingleColumn () );
74+ void testFacade () {
75+ Assertions .assertNotNull ( SimpleTableFacade .newTable ( 100 ) );
76+ Assertions .assertNotNull ( SimpleTableFacade .newTableSingleColumn () );
7777 List <Integer > colW = new ArrayList <>();
7878 colW .add ( 100 );
79- Assert .assertNotNull ( SimpleTableFacade .newTable ( colW ) );
79+ Assertions .assertNotNull ( SimpleTableFacade .newTable ( colW ) );
8080 }
8181
8282 @ Test
83- public void testCell () {
83+ void testCell () {
8484 SimpleCell cell = new SimpleCell ( "test" , 10 ).bold ().bolditalic ().italic ().left ().rigt ().underline ();
8585 cell .setContent ( "aaaa" );
86- Assert .assertNotNull ( SimpleCell .newCell ( "bbb" ) );
86+ Assertions .assertNotNull ( SimpleCell .newCell ( "bbb" ) );
8787 SimpleRow row = new SimpleRow ();
8888 row .addCell ( "cccc" );
8989 row .setHead ( BooleanUtils .BOOLEAN_TRUE );
0 commit comments