@@ -110,12 +110,13 @@ protected void toForkedRepresentation(final JUnitLauncherTask task, final XMLStr
110
110
111
111
public static List <TestDefinition > fromForkedRepresentation (final XMLStreamReader reader ) throws XMLStreamException {
112
112
reader .require (XMLStreamConstants .START_ELEMENT , null , LD_XML_ELM_TEST_CLASSES );
113
- final TestClasses testDefinition = new TestClasses ();
113
+ final List < TestDefinition > testDefinitions = new ArrayList <> ();
114
114
// read out as multiple SingleTestClass representations
115
115
while (reader .nextTag () != XMLStreamConstants .END_ELEMENT ) {
116
+ final SingleTestClass testDefinition = new SingleTestClass ();
116
117
reader .require (XMLStreamConstants .START_ELEMENT , null , Constants .LD_XML_ELM_TEST );
117
118
final String testClassName = requireAttributeValue (reader , LD_XML_ATTR_CLASS_NAME );
118
- testDefinition .add ( new StringResource ( testClassName + ".class" ) );
119
+ testDefinition .setName ( testClassName );
119
120
final String halt = reader .getAttributeValue (null , LD_XML_ATTR_HALT_ON_FAILURE );
120
121
if (halt != null ) {
121
122
testDefinition .setHaltOnFailure (Boolean .parseBoolean (halt ));
@@ -137,9 +138,10 @@ public static List<TestDefinition> fromForkedRepresentation(final XMLStreamReade
137
138
testDefinition .addConfiguredListener (ListenerDefinition .fromForkedRepresentation (reader ));
138
139
}
139
140
reader .require (XMLStreamConstants .END_ELEMENT , null , Constants .LD_XML_ELM_TEST );
141
+ testDefinitions .add (testDefinition );
140
142
}
141
143
reader .require (XMLStreamConstants .END_ELEMENT , null , LD_XML_ELM_TEST_CLASSES );
142
- return Collections .singletonList ( testDefinition );
144
+ return Collections .unmodifiableList ( testDefinitions );
143
145
}
144
146
145
147
private static String requireAttributeValue (final XMLStreamReader reader , final String attrName ) throws XMLStreamException {
0 commit comments