File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
tests/src/test/scala/kanela/agent Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,10 @@ import scala.util.Using
2323import java .util .Collections
2424import java .util .Enumeration
2525import java .util .Optional
26+ import scala .jdk .CollectionConverters .ListHasAsScala
2627
2728class ConfigurationSpec extends munit.FunSuite {
2829
29- test(" should fail to load when there is no configuration" ) {
30- val loader = classLoaderWithConfig(" " )
31- intercept[RuntimeException ] {
32- Configuration .createFrom(loader)
33- }
34- }
35-
3630 test(" should load basic configuration settings" ) {
3731 val loader = classLoaderWithConfig(
3832 """
@@ -91,8 +85,7 @@ class ConfigurationSpec extends munit.FunSuite {
9185 )
9286
9387 val config = Configuration .createFrom(loader)
94- val firstModule = config.modules().get(0 )
95- assertEquals(firstModule.name(), " tester module" )
88+ val firstModule = config.modules().asScala.find(_.name == " tester module" ).get
9689 assertEquals(firstModule.description(), Optional .empty[String ]())
9790 assertEquals(firstModule.enabled(), true )
9891 assertEquals(firstModule.order(), 1 )
You can’t perform that action at this time.
0 commit comments