Github user woonsan commented on a diff in the pull request:

    https://github.com/apache/commons-scxml/pull/2#discussion_r72977944
  
    --- Diff: src/test/java/org/apache/commons/scxml2/io/SCXMLReaderTest.java 
---
    @@ -278,6 +278,23 @@ public void testSCXMLReaderGroovyClosure() throws 
Exception {
             Assert.assertNotNull(scxml.getGlobalScript());
         }
     
    +    @Test(expected=org.apache.commons.scxml2.model.ModelException.class)
    +    public void dataWithSrcAndExprIsRejected() throws Exception {
    +      
SCXMLTestHelper.parse("org/apache/commons/scxml2/io/data-with-src-and-expr.xml");
    +    }
    +
    +    @Test
    +    public void srcAttributeOfDataIsParsed() throws Exception {
    +      SCXML scxml = 
SCXMLTestHelper.parse("org/apache/commons/scxml2/io/data-with-src.xml");
    +      Assert.assertNotNull(scxml);
    +      Assert.assertNotNull(scxml.getDatamodel());
    +      Assert.assertNotNull(scxml.getDatamodel().getData());
    +      Assert.assertEquals("Exactly one data element parsed.", 1, 
scxml.getDatamodel().getData().size());
    +      Data data = scxml.getDatamodel().getData().get(0);
    +      Assert.assertNotNull(data);
    +      Assert.assertEquals("http://www.w3.org/TR/sxcml";, data.getSrc());
    +    }
    --- End diff --
    
    Could you also add a test to read Data#getExpr()?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to