Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JUnit 5] Without a Video Annotation, a Video will never be recorded #70

Open
mseele opened this issue Feb 5, 2021 · 0 comments
Open

Comments

@mseele
Copy link

mseele commented Feb 5, 2021

com.automation.remarks.junit5.VideoExtension.videoDisabled(...) will never return true if no Video Annotation is set:

private boolean videoDisabled(Method testMethod) {
   Optional<com.automation.remarks.video.annotations.Video> 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());
 }

video.map will always return false if video is not given (javadoc of map: the mapping function to apply to a value, if present). So videoEnabled is never called without an annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant