@@ -514,14 +514,14 @@ public void test_CloseWindowListener_closeShell() {
514
514
shell .close ();
515
515
}
516
516
517
- @ Test ( expected = IllegalArgumentException . class )
517
+ @ Test
518
518
public void test_CloseWindowListener_addWithNullArg () {
519
- browser .addCloseWindowListener (null );
519
+ assertThrows ( IllegalArgumentException . class , () -> browser .addCloseWindowListener (null ) );
520
520
}
521
521
522
- @ Test ( expected = IllegalArgumentException . class )
522
+ @ Test
523
523
public void test_CloseWindowListener_removeWithNullArg () {
524
- browser .removeCloseWindowListener (null );
524
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeCloseWindowListener (null ) );
525
525
}
526
526
527
527
@ Test
@@ -554,14 +554,14 @@ public void test_LocationListener_adapter_closeShell() {
554
554
shell .close ();
555
555
}
556
556
557
- @ Test ( expected = IllegalArgumentException . class )
557
+ @ Test
558
558
public void test_LocationListener_addWithNullArg () {
559
- browser .addLocationListener (null );
559
+ assertThrows ( IllegalArgumentException . class , () -> browser .addLocationListener (null ) );
560
560
}
561
561
562
- @ Test ( expected = IllegalArgumentException . class )
562
+ @ Test
563
563
public void test_LocationListener_removeWithNullArg () {
564
- browser .removeLocationListener (null );
564
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeLocationListener (null ) );
565
565
}
566
566
567
567
@ Test
@@ -806,14 +806,14 @@ public void test_OpenWindowListener_closeShell() {
806
806
shell .close ();
807
807
}
808
808
809
- @ Test ( expected = IllegalArgumentException . class )
809
+ @ Test
810
810
public void test_OpenWindowListener_addWithNulArg () {
811
- browser .addOpenWindowListener (null );
811
+ assertThrows ( IllegalArgumentException . class , () -> browser .addOpenWindowListener (null ) );
812
812
}
813
813
814
- @ Test ( expected = IllegalArgumentException . class )
814
+ @ Test
815
815
public void test_OpenWindowListener_removeWithNullArg () {
816
- browser .removeOpenWindowListener (null );
816
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeOpenWindowListener (null ) );
817
817
}
818
818
819
819
@ Test
@@ -967,14 +967,14 @@ public void completed(ProgressEvent event) {
967
967
shell .close ();
968
968
}
969
969
970
- @ Test ( expected = IllegalArgumentException . class )
970
+ @ Test
971
971
public void test_ProgressListener_addWithNullArg () {
972
- browser .addProgressListener (null );
972
+ assertThrows ( IllegalArgumentException . class , () -> browser .addProgressListener (null ) );
973
973
}
974
974
975
- @ Test ( expected = IllegalArgumentException . class )
975
+ @ Test
976
976
public void test_ProgressListener_removeWithNullArg () {
977
- browser .removeProgressListener (null );
977
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeProgressListener (null ) );
978
978
}
979
979
980
980
@ Test
@@ -1013,14 +1013,14 @@ public void changed(ProgressEvent event) {
1013
1013
assertTrue (passed );
1014
1014
}
1015
1015
1016
- @ Test ( expected = IllegalArgumentException . class )
1016
+ @ Test
1017
1017
public void test_StatusTextListener_addWithNull () {
1018
- browser .addStatusTextListener (null );
1018
+ assertThrows ( IllegalArgumentException . class , () -> browser .addStatusTextListener (null ) );
1019
1019
}
1020
1020
1021
- @ Test ( expected = IllegalArgumentException . class )
1021
+ @ Test
1022
1022
public void test_StatusTextListener_removeWithNullArg () {
1023
- browser .removeStatusTextListener (null );
1023
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeStatusTextListener (null ) );
1024
1024
}
1025
1025
1026
1026
@ Test
@@ -1104,14 +1104,14 @@ public void test_TitleListener_addListener_closeShell() {
1104
1104
shell .close ();
1105
1105
}
1106
1106
1107
- @ Test ( expected = IllegalArgumentException . class )
1107
+ @ Test
1108
1108
public void test_TitleListener_addwithNull () {
1109
- browser .addTitleListener (null );
1109
+ assertThrows ( IllegalArgumentException . class , () -> browser .addTitleListener (null ) );
1110
1110
}
1111
1111
1112
- @ Test ( expected = IllegalArgumentException . class )
1112
+ @ Test
1113
1113
public void test_TitleListener_removeWithNullArg () {
1114
- browser .removeTitleListener (null );
1114
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeTitleListener (null ) );
1115
1115
}
1116
1116
1117
1117
@ Test
@@ -1298,14 +1298,14 @@ public void show(WindowEvent event) {
1298
1298
shell .close ();
1299
1299
}
1300
1300
1301
- @ Test ( expected = IllegalArgumentException . class )
1301
+ @ Test
1302
1302
public void test_VisibilityWindowListener_addWithNull () {
1303
- browser .addVisibilityWindowListener (null );
1303
+ assertThrows ( IllegalArgumentException . class , () -> browser .addVisibilityWindowListener (null ) );
1304
1304
}
1305
1305
1306
- @ Test ( expected = IllegalArgumentException . class )
1306
+ @ Test
1307
1307
public void test_VisibilityWindowListener_removeWithNullArg () {
1308
- browser .removeVisibilityWindowListener (null );
1308
+ assertThrows ( IllegalArgumentException . class , () -> browser .removeVisibilityWindowListener (null ) );
1309
1309
}
1310
1310
1311
1311
@ Test
@@ -1457,14 +1457,14 @@ public void test_back() {
1457
1457
assertFalse (result );
1458
1458
}
1459
1459
1460
- @ Test ( expected = IllegalArgumentException . class )
1460
+ @ Test
1461
1461
public void test_setTextNull () {
1462
- browser .setText (null );
1462
+ assertThrows ( IllegalArgumentException . class , () -> browser .setText (null ) );
1463
1463
}
1464
1464
1465
- @ Test ( expected = IllegalArgumentException . class )
1465
+ @ Test
1466
1466
public void test_setUrlWithNullArg () {
1467
- browser .setUrl (null );
1467
+ assertThrows ( IllegalArgumentException . class , () -> browser .setUrl (null ) );
1468
1468
}
1469
1469
1470
1470
@@ -1831,9 +1831,9 @@ public void test_stop() {
1831
1831
browser .stop ();
1832
1832
}
1833
1833
1834
- @ Test ( expected = IllegalArgumentException . class )
1834
+ @ Test
1835
1835
public void test_execute_withNullArg () {
1836
- browser .execute (null );
1836
+ assertThrows ( IllegalArgumentException . class , () -> browser .execute (null ) );
1837
1837
}
1838
1838
1839
1839
/**
0 commit comments