You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Alexander Deutschmann (Jira)" <ji...@apache.org> on 2019/11/25 08:02:00 UTC
[jira] [Comment Edited] (DAFFODIL-2241) Java Junit Test TDML not
working
[ https://issues.apache.org/jira/browse/DAFFODIL-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16981364#comment-16981364 ]
Alexander Deutschmann edited comment on DAFFODIL-2241 at 11/25/19 8:01 AM:
---------------------------------------------------------------------------
Hello Mike,
thanks for your response and your help :)
But its not working with Version 2.4.0. The Runner Constructor is unavailable.
My Runner Constructor:
{code:java|borderStyle=solid}
class Runner private (elem: scala.xml.Elem, dir: String, file: String,
validateTDMLFile: Boolean = true,
validateDFDLSchemas: Boolean = true,
compileAllTopLevel: Boolean = false,
defaultRoundTripDefault: RoundTrip = Runner.defaultRoundTripDefaultDefault,
defaultValidationDefault: String = Runner.defaultValidationDefaultDefault,
defaultImplementationsDefault: Seq[String] = Runner.defaultImplementationsDefaultDefault)
{nocode}
was (Author: adeutschmann):
Hello Mike,
thanks for your response and your help :)
But its not working with Version 2.4.0. The Runner Constructor is unavailable.
My Runner Constructor:
{code:java}
class Runner private (elem: scala.xml.Elem, dir: String, file: String,
validateTDMLFile: Boolean = true,
validateDFDLSchemas: Boolean = true,
compileAllTopLevel: Boolean = false,
defaultRoundTripDefault: RoundTrip = Runner.defaultRoundTripDefaultDefault,
defaultValidationDefault: String = Runner.defaultValidationDefaultDefault,
defaultImplementationsDefault: Seq[String] = Runner.defaultImplementationsDefaultDefault)
{nocode}
> Java Junit Test TDML not working
> --------------------------------
>
> Key: DAFFODIL-2241
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2241
> Project: Daffodil
> Issue Type: Bug
> Components: TDML Runner
> Affects Versions: 2.4.0
> Reporter: Alexander Deutschmann
> Assignee: Mike Beckerle
> Priority: Major
> Attachments: tdmlTutorial.tdml.xml
>
>
> If i create the following small junit test
> {code:java|borderStyle=solid}
> public class TestTDML {
>
> private DFDLTestSuite testSuite;
> @BeforeEach
> public void setup() {
> String tpktProtocolTestCases = "handshake.tdml";
> testSuite = new DFDLTestSuite(Misc.getRequiredResource(tpktProtocolTestCases), true, true, true,
> Runner.defaultRoundTripDefaultDefault(), Runner.defaultValidationDefaultDefault(), Runner.defaultImplementationsDefaultDefault(), true, true);
> }
> @Test
> public void testFirst() {
>
> Option<Node> node = scala.Option.apply(this.testSuite.ts() );
> this.testSuite.runAllTests(node);
> }
> }
> {code}
> With this tdml file:
> [https://github.com/apache/incubator-daffodil/blob/master/tutorials/src/main/resources/tdmlTutorial.tdml.xml]
>
> I get the following error:
> {noformat}
> org.apache.daffodil.tdml.TDMLExceptionImpl: (Implementation: daffodil) SchemaDefinitionError: Schema Definition Error: The file [file:/C:/Users/E521642/AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file:///C:/Users/E521642/AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd] did not contain a schema element as the document element. Found testSuite in namespace [http://www.ibm.com/xmlns/dfdl/testData].
> Schema context: [file:AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file://appdata/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd] Location in [file:AppData/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd|file://appdata/Local/Temp/dateTimeTest5799978260534849438.dfdl.xsd]
> {noformat}
>
> I cant execute any tests.
> Can you help me or assist what i can do?
> Thanks
> Greetings
> Alex
--
This message was sent by Atlassian Jira
(v8.3.4#803005)