Commit e73db7bf authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added init test on write deps

parent f36e6431
package nl.lumc.sasc.biopet.core
import java.nio.file.Files
import org.broadinstitute.gatk.queue.function.QFunction
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
* Created by pjvanthof on 09/05/16.
class WriteDependenciesTest extends TestNGSuite with Matchers {
import WriteDependenciesTest._
case class Qfunc(in: Seq[File], out: Seq[File]) extends QFunction {
override def inputs = in
override def outputs = out
override def doneOutputs = => new File(x.getParentFile, s".${x.getName}.done"))
override def failOutputs = => new File(x.getParentFile, s".${x.getName}.fail"))
jobOutputFile = new File(out.head + ".out")
def test: Unit = {
val outputFile = File.createTempFile("deps.", ".json")
WriteDependencies.writeDependencies(Qfunc(file1 :: Nil, file2 :: Nil) :: Qfunc(file2 :: Nil, file3 :: Nil) :: Nil, outputFile)
object WriteDependenciesTest {
val tempDir = Files.createTempDirectory("test").toFile
val file1 = new File(tempDir, "file1.txt")
val file2 = new File(tempDir, "file2.txt")
val file3 = new File(tempDir, "file3.txt")
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment