arosien commented on code in PR #1057:
URL: https://github.com/apache/daffodil/pull/1057#discussion_r1480298851
##########
daffodil-tdml-lib/src/test/scala/org/apache/daffodil/tdml/JaxbTests.scala:
##########
@@ -0,0 +1,20 @@
+package org.apache.daffodil.tdml
+
+import org.junit.Assert._
+import org.junit.Test
+
+import javax.xml.bind.JAXBContext
+
+class JaxbTests {
+
+ @Test def testReading(): Unit = {
+ val testSuite = JAXBContext
+ .newInstance(classOf[TestSuite])
+ .createUnmarshaller()
+
.unmarshal(getClass.getClassLoader().getResourceAsStream("test-suite/ibm-contributed/dpaext1-2.tdml"))
+ .asInstanceOf[TestSuite]
+
+ assertNotNull(testSuite)
+ assertEquals("dpaext", testSuite.suiteName)
Review Comment:
`dfdlinfoset` is translated into:
```scala
case class DfdlInfosetType(var mixed: Seq[scalaxb.DataRecord[Any]] = Nil,
var attributes: Map[String, scalaxb.DataRecord[Any]] = Map.empty) {
def typeValue = attributes("@type").as[Type]
def typeValue_=(_value: Type)(implicit evidence:
scalaxb.CanWriteXML[Type]) = attributes += "@type" -> scalaxb.DataRecord(_value)
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]