Closed
Description
Description
For method of
from guava's Stats we got following tests:
///region Test suites for executable com.google.common.math.Stats.of
--
///region
@Test
public void testOf1() throws Throwable {
int[] intArray = new int[0];
Stats actual = Stats.of(intArray);
Stats expected = new Stats(0L, 0.0, 0.0, Double.NaN, Double.NaN);
// com.google.common.math.Stats has overridden equals method
assertEquals(expected, actual);
}
@Test
public void testOf2() throws Throwable {
MockedStatic mockedStatic = null;
try {
mockedStatic = mockStatic(Doubles.class);
mockedStatic.when(() -> Doubles.isFinite(anyDouble())).thenReturn(true);
int[] intArray = new int[1];
intArray[0] = 228;
Stats actual = Stats.of(intArray);
Stats expected = new Stats(1L, 228.0, 0.0, 228.0, 228.0);
// com.google.common.math.Stats has overridden equals method
assertEquals(expected, actual);
} finally {
mockedStatic.close();
}
}
To Reproduce
Steps to reproduce the behavior:
- Run the guava project in IntelliJ Idea
- Use plugin to generate tests for one of overloaded Stats.of method
- Open the generated test
Expected behavior
Tests are supposed to be generated with KDocs, display names and custom method names.
Actual behavior
Tests are generated without KDocs, displayNames and with weird method names
Environment
- Java 8
- Windows 10
- JUnit 5
- Generation without mocks
- Generation during 600 seconds
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done