Merge pull request #20 from Zelenyy/dev-zelenyy
Two test for checking Meta.enum extension.
This commit is contained in:
commit
6d52db311d
@ -0,0 +1,22 @@
|
||||
package hep.dataforge.meta
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class MetaExtensionTest {
|
||||
|
||||
enum class TestEnum{
|
||||
test
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEnum(){
|
||||
val meta = buildMeta{"enum" to TestEnum.test}
|
||||
meta["enum"].enum<TestEnum>()
|
||||
}
|
||||
@Test
|
||||
fun testEnumByString(){
|
||||
val meta = buildMeta{"enum" to TestEnum.test.toString()}
|
||||
println(meta["enum"].enum<TestEnum>())
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user