Skip to content

Commit

Permalink
Fix VideoCaptureSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
Mjl33 committed Dec 18, 2021
1 parent 4a1f880 commit 2e68d32
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.frameworkium.core.ui.video

import org.apache.commons.io.FileUtils
import spock.lang.Specification

import java.nio.file.Files
Expand All @@ -8,7 +9,7 @@ import java.util.concurrent.TimeoutException
class VideoCaptureSpec extends Specification {

def setup() {
VideoCapture.VIDEO_FOLDER.deleteDir()
FileUtils.deleteDirectory(VideoCapture.VIDEO_FOLDER.toFile())
}

def array = [0, 1, 0, 1] as byte[]
Expand All @@ -25,7 +26,8 @@ class VideoCaptureSpec extends Specification {
when:
sut.fetchAndSaveVideo("test1")
then:
VideoCapture.VIDEO_FOLDER.resolve("test1-session1.ext").readBytes() == array
def filepath = VideoCapture.VIDEO_FOLDER.resolve("test1-session1.ext")
Files.readAllBytes(filepath) == array
}

def "doesn't save file on fetch timeout"() {
Expand Down

0 comments on commit 2e68d32

Please sign in to comment.