Skip to content

Commit df8265c

Browse files
committed
improved test
1 parent 7ec3e14 commit df8265c

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

core/src/test/kotlin/org/evomaster/core/EMConfigTest.kt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -641,25 +641,23 @@ internal class EMConfigTest{
641641
assertTrue(config.nameWithQueryParameters)
642642
}
643643

644+
644645
@Test
645-
fun testMaxCharsLengthIs80ByDefault() {
646+
fun testMaxCharsLengthCanBeChangedByParam() {
646647
val parser = EMConfig.getOptionParser()
647648
val config = EMConfig()
648649

649-
config.updateProperties(parser.parse())
650+
val default = config.maxTestCaseNameLength
650651

651-
assertEquals(config.maxTestCaseNameLength, 80)
652-
}
652+
config.updateProperties(parser.parse())
653+
assertEquals(config.maxTestCaseNameLength, default)
653654

654-
@Test
655-
fun testMaxCharsLengthCanBeChangedByParam() {
656-
val parser = EMConfig.getOptionParser()
657-
val config = EMConfig()
655+
val different = default * 2
658656

659-
val options = parser.parse("--maxTestCaseNameLength", "30")
657+
val options = parser.parse("--maxTestCaseNameLength", "$different")
660658
config.updateProperties(options)
661659

662-
assertEquals(config.maxTestCaseNameLength, 30)
660+
assertEquals(config.maxTestCaseNameLength, different)
663661
}
664662

665663
}

0 commit comments

Comments
 (0)