Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
cf11d4ac
Commit
cf11d4ac
authored
Sep 09, 2015
by
Peter van 't Hof
Browse files
Output to a file, no output to stdout anymore
parent
07d09eb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/SamplesTsvToJsonTest.scala
View file @
cf11d4ac
...
...
@@ -20,28 +20,32 @@ class SamplesTsvToJsonTest extends TestNGSuite with MockitoSugar with Matchers {
@Test
def
testCorrectSampleTsv
=
{
val
tsv
=
resourcePath
(
"/sample.tsv"
)
val
output
=
File
.
createTempFile
(
"testCorrectSampleTsv"
,
".json"
)
noException
should
be
thrownBy
main
(
Array
(
"-i"
,
tsv
))
noException
should
be
thrownBy
main
(
Array
(
"-i"
,
tsv
,
"-o"
,
output
.
toString
))
}
@Test
def
testNoSampleColumn
()
=
{
val
tsv
=
resourcePath
(
"/no_sample.tsv"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
))
val
output
=
File
.
createTempFile
(
"testNoSampleColumn"
,
".json"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
,
"-o"
,
output
.
toString
))
thrown
.
getMessage
should
equal
(
"Sample column does not exist in: "
+
tsv
)
}
@Test
def
testNumberInLibs
=
{
val
tsv
=
resourcePath
(
"/number.tsv"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
))
val
output
=
File
.
createTempFile
(
"testNumberInLibs"
,
".json"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
,
"-o"
,
output
.
toString
))
thrown
.
getMessage
should
equal
(
"Sample or library may not start with a number"
)
}
@Test
def
testSampleIDs
=
{
val
tsv
=
resourcePath
(
"/same.tsv"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
))
val
output
=
File
.
createTempFile
(
"testSampleIDs"
,
".json"
)
val
thrown
=
the
[
IllegalStateException
]
thrownBy
main
(
Array
(
"-i"
,
tsv
,
"-o"
,
output
.
toString
))
thrown
.
getMessage
should
equal
(
"Combination of Sample_ID_1 and Lib_ID_1 is found multiple times"
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment