Description
There are identical tests generated for io.seata.core.store.StoreMode.valueof in seata-core-0.5.0 with ContestEstimator.
To Reproduce
- Run the 'utbot' project in IntelliJ Idea 2022.2.4
- Open
utbot-junit-contest/src/main/kotlin/org/utbot/contest/ContestEstimator.kt
- Change
javaHome property to full local path to JDK 8
- In
fun main change: projectFilter = listOf("seata-core-0.5.0")
- Run
fun main - make sure to set JRE in Edit Configurations to JDK 8.
- When run is finished, check
utbot-junit-contest/build/output/test/seata-core-0.5.0/io/seata/core/store/StoreModeTest.java
Expected behavior
Tests are supposed to be minimized - if several tests are covering same branches, only one should be present in resulting tests class.
Actual behavior
There are three identical tests on IllegalArgumentException for io.seata.core.store.StoreMode.valueof
Trying to call enum's method valueOf with abc, ab, h - while enum values are file, db.
Visual proofs (screenshots, logs, images)
Here is the generated test class:
package io.seata.core.store;
import org.junit.Test;
public final class StoreModeTest {
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof1() {
StoreMode.valueof("abc");
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof2() {
StoreMode.valueof("ab");
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof3() {
String string = "h";
StoreMode.valueof(string);
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof4() {
StoreMode.valueof(null);
}
///endregion
///endregion
}
Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.4
JDK 8
Description
There are identical tests generated for
io.seata.core.store.StoreMode.valueofinseata-core-0.5.0with ContestEstimator.To Reproduce
utbot-junit-contest/src/main/kotlin/org/utbot/contest/ContestEstimator.ktjavaHomeproperty to full local path to JDK 8fun mainchange:projectFilter = listOf("seata-core-0.5.0")fun main- make sure to set JRE in Edit Configurations to JDK 8.utbot-junit-contest/build/output/test/seata-core-0.5.0/io/seata/core/store/StoreModeTest.javaExpected behavior
Tests are supposed to be minimized - if several tests are covering same branches, only one should be present in resulting tests class.
Actual behavior
There are three identical tests on IllegalArgumentException for
io.seata.core.store.StoreMode.valueofTrying to call enum's method valueOf with
abc,ab,h- while enum values arefile,db.Visual proofs (screenshots, logs, images)
Here is the generated test class:
Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.4
JDK 8