@Test public void displayNamesIgnoredInReport() throws NoSuchMethodException { TestMethodTestDescriptorWithDisplayName descriptor = new TestMethodTestDescriptorWithDisplayName( newId(), MyTestClass.class, MyTestClass.class.getDeclaredMethod( "myNamedTestMethod" ), "some display name" ); TestIdentifier factoryIdentifier = TestIdentifier.from( descriptor ); ArgumentCaptor<ReportEntry> entryCaptor = ArgumentCaptor.forClass( ReportEntry.class ); adapter.executionSkipped( factoryIdentifier, "" ); verify( listener ).testSkipped( entryCaptor.capture() ); ReportEntry value = entryCaptor.getValue(); assertEquals( MyTestClass.class.getName(), value.getSourceName() ); assertNull( value.getSourceText() ); assertEquals( "myNamedTestMethod", value.getName() ); assertEquals( "some display name", value.getNameText() ); }
@Override public void executionSkipped( TestIdentifier testIdentifier, String reason ) { testStartTime.remove( testIdentifier ); runListener.testSkipped( createReportEntry( testIdentifier, null, emptyMap(), reason, null ) ); }
RunListenerAdapter implements TestExecutionListener { @Override public void executionSkipped( TestIdentifier testIdentifier, String reason ) { testStartTime.remove( testIdentifier ); runListener.testSkipped( createReportEntry( testIdentifier, null, emptyMap(), reason, null ) ); } }
RunListenerAdapter implements TestExecutionListener { @Override public void executionSkipped( TestIdentifier testIdentifier, String reason ) { testStartTime.remove( testIdentifier ); runListener.testSkipped( createReportEntry( testIdentifier, null, emptyMap(), reason, null ) ); } RunListenerAdapter( RunListener runListener ); }
RunListenerAdapter implements TestExecutionListener { @Override public void executionSkipped( TestIdentifier testIdentifier, String reason ) { testStartTime.remove( testIdentifier ); runListener.testSkipped( createReportEntry( testIdentifier, null, emptyMap(), reason, null ) ); } RunListenerAdapter( RunListener runListener ); @Override void testPlanExecutionStarted( TestPlan testPlan ); @Override void testPlanExecutionFinished( TestPlan testPlan ); @Override void executionStarted( TestIdentifier testIdentifier ); @Override void executionFinished( TestIdentifier testIdentifier, TestExecutionResult testExecutionResult ); @Override void executionSkipped( TestIdentifier testIdentifier, String reason ); }
RunListenerAdapter implements TestExecutionListener { @Override public void executionSkipped( TestIdentifier testIdentifier, String reason ) { testStartTime.remove( testIdentifier ); runListener.testSkipped( createReportEntry( testIdentifier, null, emptyMap(), reason, null ) ); } RunListenerAdapter( RunListener runListener ); @Override void testPlanExecutionStarted( TestPlan testPlan ); @Override void testPlanExecutionFinished( TestPlan testPlan ); @Override void executionStarted( TestIdentifier testIdentifier ); @Override void executionFinished( TestIdentifier testIdentifier, TestExecutionResult testExecutionResult ); @Override void executionSkipped( TestIdentifier testIdentifier, String reason );  }