Skip to content

Missed generated summary for the Stats.of method from guava #198

Closed
@amandelpie

Description

@amandelpie

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:

  1. Run the guava project in IntelliJ Idea
  2. Use plugin to generate tests for one of overloaded Stats.of method
  3. 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

  1. Java 8
  2. Windows 10
  3. JUnit 5
  4. Generation without mocks
  5. Generation during 600 seconds

Metadata

Metadata

Assignees

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions