From 7ccce41e8e5d611581b6e6dc6f0eebd86212122b Mon Sep 17 00:00:00 2001 From: Michael Seele Date: Fri, 5 Feb 2021 08:16:31 +0100 Subject: [PATCH] fix: make Video annotation optional, not required --- .../java/com/automation/remarks/junit5/VideoExtension.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java b/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java index b41e494..ed97d09 100644 --- a/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java +++ b/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java @@ -49,10 +49,7 @@ public void afterTestExecution(ExtensionContext context) throws Exception { private boolean videoDisabled(Method testMethod) { Optional video = AnnotationUtils.findAnnotation(testMethod, com.automation.remarks.video.annotations.Video.class); - return video.map(v -> !videoEnabled(v)) - .orElseGet(() -> true); - - //return !video.isPresent() && !videoEnabled(video.get()); + return !videoEnabled(video.orElse(null)); } private String getFileName(Method testMethod) {