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
220d2a7f
Commit
220d2a7f
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added unit tests to configvalue class
parent
168c586d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/core/config/ConfigValueTest.scala
+29
-0
29 additions, 0 deletions
...ala/nl/lumc/sasc/biopet/core/config/ConfigValueTest.scala
with
29 additions
and
0 deletions
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/core/config/ConfigValueTest.scala
0 → 100644
+
29
−
0
View file @
220d2a7f
package
nl.lumc.sasc.biopet.core.config
import
java.io.File
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by pjvan_thof on 1/8/15.
*/
class
ConfigValueTest
extends
TestNGSuite
with
MockitoSugar
with
Matchers
{
val
index
=
ConfigValueIndex
(
""
,
Nil
,
""
)
@Test
def
testAs
:
Unit
=
{
ConfigValue
(
index
,
index
,
"bla"
).
asString
shouldBe
"bla"
ConfigValue
(
index
,
index
,
1
).
asInt
shouldBe
1
ConfigValue
(
index
,
index
,
1.0
).
asDouble
shouldBe
1.0
ConfigValue
(
index
,
index
,
List
(
"bla"
)).
asList
shouldBe
List
(
"bla"
)
ConfigValue
(
index
,
index
,
true
).
asBoolean
shouldBe
true
ConfigValue
(
index
,
index
,
Map
(
"1"
->
1
)).
asMap
shouldBe
Map
(
"1"
->
1
)
ConfigValue
(
index
,
index
,
List
(
"bla"
)).
asStringList
shouldBe
List
(
"bla"
)
ConfigValue
(
index
,
index
,
List
(
"bla"
)).
asFileList
shouldBe
List
(
new
File
(
"bla"
))
}
@Test
def
testToString
:
Unit
=
{
ConfigValue
(
index
,
index
,
"bla"
,
true
).
toString
.
getClass
.
getSimpleName
shouldBe
"String"
}
}
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