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
86eebea5
Commit
86eebea5
authored
Feb 10, 2015
by
Peter van 't Hof
Browse files
Remove tests
parent
81d8c367
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala
View file @
86eebea5
...
...
@@ -331,7 +331,6 @@ object ConfigUtils extends Logging {
trait
ImplicitConversions
{
import
scala.language.implicitConversions
//TODO: unit test on message
private
def
requiredValue
(
value
:
ConfigValue
)
:
Boolean
=
{
val
exist
=
valueExists
(
value
)
if
(!
exist
)
...
...
public/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/utils/ConfigUtilsTest.scala
View file @
86eebea5
...
...
@@ -4,6 +4,7 @@ import java.io.{ PrintWriter, File }
import
argonaut.Argonaut._
import
argonaut.Json
import
nl.lumc.sasc.biopet.core.BiopetQScript
import
nl.lumc.sasc.biopet.core.config.
{
ConfigValueIndex
,
ConfigValue
}
import
org.scalatest.Matchers
import
org.scalatest.mock.MockitoSugar
...
...
@@ -170,79 +171,23 @@ class ConfigUtilsTest extends TestNGSuite with Matchers {
val
index
=
ConfigValueIndex
(
"test"
,
Nil
,
"test"
)
new
ImplicitConversions
{
configValue2list
(
ConfigValue
(
index
,
index
,
List
(
""
)))
shouldBe
List
(
""
)
intercept
[
IllegalStateException
]
{
configValue2list
(
ConfigValue
(
index
,
index
,
null
))
}
configValue2stringList
(
ConfigValue
(
index
,
index
,
List
(
""
)))
shouldBe
List
(
""
)
intercept
[
IllegalStateException
]
{
configValue2stringList
(
ConfigValue
(
index
,
index
,
null
))
}
configValue2stringSet
(
ConfigValue
(
index
,
index
,
List
(
""
)))
shouldBe
Set
(
""
)
intercept
[
IllegalStateException
]
{
configValue2stringSet
(
ConfigValue
(
index
,
index
,
null
))
}
var
int
:
Int
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
int
=
ConfigValue
(
index
,
index
,
null
)
}
var
long
:
Long
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
long
=
ConfigValue
(
index
,
index
,
null
)
}
var
double
:
Double
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
double
=
ConfigValue
(
index
,
index
,
null
)
}
var
float
:
Float
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
float
=
ConfigValue
(
index
,
index
,
null
)
}
var
boolean
:
Boolean
=
ConfigValue
(
index
,
index
,
true
)
intercept
[
IllegalStateException
]
{
boolean
=
ConfigValue
(
index
,
index
,
null
)
}
var
intOption
:
Option
[
Int
]
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
int
=
ConfigValue
(
index
,
index
,
null
)
}
var
longOption
:
Option
[
Long
]
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
long
=
ConfigValue
(
index
,
index
,
null
)
}
var
doubleOption
:
Option
[
Double
]
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
double
=
ConfigValue
(
index
,
index
,
null
)
}
var
floatOption
:
Option
[
Float
]
=
ConfigValue
(
index
,
index
,
1
)
intercept
[
IllegalStateException
]
{
float
=
ConfigValue
(
index
,
index
,
null
)
}
var
booleanOption
:
Option
[
Boolean
]
=
ConfigValue
(
index
,
index
,
true
)
intercept
[
IllegalStateException
]
{
boolean
=
ConfigValue
(
index
,
index
,
null
)
}
var
string
:
String
=
ConfigValue
(
index
,
index
,
"test"
)
intercept
[
IllegalStateException
]
{
string
=
ConfigValue
(
index
,
index
,
null
)
}
var
file
:
File
=
ConfigValue
(
index
,
index
,
"test"
)
intercept
[
IllegalStateException
]
{
file
=
ConfigValue
(
index
,
index
,
null
)
}
//TODO: test BiopetQScript error message
}
}
}
...
...
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