Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
8cd22458
Commit
8cd22458
authored
10 years ago
by
bow
Browse files
Options
Downloads
Patches
Plain Diff
Add test for Gentrap initialization with minimum config
parent
a0b22bd9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/gentrap/pom.xml
+12
-0
12 additions, 0 deletions
public/gentrap/pom.xml
public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
+51
-0
51 additions, 0 deletions
...a/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
with
63 additions
and
0 deletions
public/gentrap/pom.xml
+
12
−
0
View file @
8cd22458
...
...
@@ -44,5 +44,17 @@
<artifactId>
Mapping
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.testng
</groupId>
<artifactId>
testng
</artifactId>
<version>
6.8
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.scalatest
</groupId>
<artifactId>
scalatest_2.11
</artifactId>
<version>
2.2.1
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
This diff is collapsed.
Click to expand it.
public/gentrap/src/test/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapTest.scala
0 → 100644
+
51
−
0
View file @
8cd22458
/**
* Copyright (c) 2015 Leiden University Medical Center - Sequencing Analysis Support Core <sasc@lumc.nl>
* @author Wibowo Arindrarto <w.arindrarto@lumc.nl>
*/
package
nl.lumc.sasc.biopet.pipelines.gentrap
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
import
nl.lumc.sasc.biopet.core.config.Config
class
GentrapTest
extends
TestNGSuite
with
Matchers
{
/** Method to set test config */
// since the pipeline Config is a global value, we first store the
// initial config into a value, store the supplied value, then return
// the initial config for restoring later
private
def
setConfig
(
map
:
Map
[
String
,
Any
])
:
Map
[
String
,
Any
]
=
{
val
oldMap
:
Map
[
String
,
Any
]
=
Config
.
global
.
map
.
toMap
Config
.
global
.
map
=
map
oldMap
}
/** Method to set the global config */
private
def
restoreConfig
(
initConfig
:
Map
[
String
,
Any
])
:
Unit
=
Config
.
global
.
map
=
initConfig
/** Minimum config required for Gentrap */
private
val
minimumConfig
=
Map
(
"output_dir"
->
"/tmp"
,
"aligner"
->
"gsnap"
,
"reference"
->
"mock"
,
"gsnap"
->
Map
(
"db"
->
"fixt_gentrap_hg19"
),
"samples"
->
Map
(
"sample_1"
->
Map
(
"libraries"
->
Map
(
"lib_1"
->
Map
(
"R1"
->
"/tmp/mock.fq"
)
)
)
)
)
// Test pipeline initialization with minimum config -- there should be no exceptions raised
@Test
def
testInitMinimumConfig
()
=
{
val
initialConfig
=
setConfig
(
minimumConfig
)
val
gentrap
=
new
Gentrap
()
restoreConfig
(
initialConfig
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment