15
15
import org .testng .xml .XmlScript ;
16
16
import org .testng .xml .XmlSuite ;
17
17
import org .testng .xml .XmlTest ;
18
+ import org .yaml .snakeyaml .LoaderOptions ;
18
19
import org .yaml .snakeyaml .TypeDescription ;
19
20
import org .yaml .snakeyaml .constructor .Constructor ;
20
21
import org .yaml .snakeyaml .nodes .MappingNode ;
@@ -30,7 +31,7 @@ private Yaml() {}
30
31
31
32
public static XmlSuite parse (String filePath , InputStream is , boolean loadClasses )
32
33
throws FileNotFoundException {
33
- Constructor constructor = new TestNGConstructor (XmlSuite .class );
34
+ Constructor constructor = new TestNGConstructor (XmlSuite .class , new LoaderOptions () );
34
35
{
35
36
TypeDescription suiteDescription = new TypeDescription (XmlSuite .class );
36
37
suiteDescription .addPropertyParameters ("packages" , XmlPackage .class );
@@ -301,8 +302,8 @@ private static void toYaml(StringBuilder sb, String sp, Map<String, String> para
301
302
302
303
private static class TestNGConstructor extends Constructor {
303
304
304
- public TestNGConstructor (Class <?> theRoot ) {
305
- super (theRoot );
305
+ public TestNGConstructor (Class <?> theRoot , LoaderOptions loadingConfig ) {
306
+ super (theRoot , loadingConfig );
306
307
yamlClassConstructors .put (NodeId .scalar , new ConstructParallelMode ());
307
308
yamlClassConstructors .put (NodeId .mapping , new ConstructXmlScript ());
308
309
}
0 commit comments