commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SCXML-251) src attribute is not available for data elements
Date Mon, 01 Aug 2016 13:34:20 GMT

    [ https://issues.apache.org/jira/browse/SCXML-251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15402030#comment-15402030
] 

ASF GitHub Bot commented on SCXML-251:
--------------------------------------

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()?


> src attribute is not available for data elements
> ------------------------------------------------
>
>                 Key: SCXML-251
>                 URL: https://issues.apache.org/jira/browse/SCXML-251
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Tobias Lippert
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The read routine ignores the "src" attribute in <data> elements in the data model.
> The field should be available to allow for users of the library to identify data elements
with a src, and process the value of the attribute.
> The Data class itself already has the src member, and the corresponding getters and setters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message