Two test for checking Meta.enum extension.

Test `testEnum` failed.
This commit is contained in:
Mikhail Zelenyy 2019-10-04 20:16:34 +03:00
parent 1b118986f5
commit e68e184fb2

View File

@ -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>())
}
}