@@ -14,31 +14,31 @@ public static Boolean testHasAttributes(Test test) {
1414 }
1515
1616 public static Boolean testHasAuthor (Test test ) {
17- return !test .getAuthorContext ().isEmpty ();
17+ return test != null && !test .getAuthorContext ().isEmpty ();
1818 }
1919
2020 public static Boolean testHasCategory (Test test ) {
21- return !test .getCategoryContext ().isEmpty ();
21+ return test != null && !test .getCategoryContext ().isEmpty ();
2222 }
2323
2424 public static Boolean testHasDevice (Test test ) {
25- return !test .getDeviceContext ().isEmpty ();
25+ return test != null && !test .getDeviceContext ().isEmpty ();
2626 }
2727
2828 public static Boolean testHasException (Test test ) {
29- return !test .getExceptionInfoContext ().isEmpty ();
29+ return test != null && !test .getExceptionInfoContext ().isEmpty ();
3030 }
3131
3232 public static Boolean testHasChildren (Test test ) {
33- return !test .getNodeContext ().isEmpty ();
33+ return test != null && !test .getNodeContext ().isEmpty ();
3434 }
3535
3636 public static Boolean testHasLog (Test test ) {
37- return !test .getLogContext ().isEmpty ();
37+ return test != null && !test .getLogContext ().isEmpty ();
3838 }
3939
4040 public static Boolean testHasScreenCapture (Test test ) {
41- return !test .getScreenCaptureContext ().isEmpty ();
41+ return test != null && !test .getScreenCaptureContext ().isEmpty ();
4242 }
4343
4444 public static Boolean testHasScreenCapture (Test test , Boolean deep ) {
@@ -54,7 +54,7 @@ public static Boolean testHasScreenCapture(Test test, Boolean deep) {
5454 }
5555
5656 public static Boolean isTestBehaviorDriven (Test test ) {
57- return test .getBddType () != null ;
57+ return test != null && test .getBddType () != null ;
5858 }
5959
6060 public static String getBehaviorDrivenTypeName (Class <? extends IGherkinFormatterModel > bddType )
0 commit comments