Skip to content

Commit

Permalink
moved inherited test
Browse files Browse the repository at this point in the history
  • Loading branch information
rainer-prosi committed Nov 22, 2024
1 parent e49f4ca commit aebfc2c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/test/java/org/cip4/jdflib/extensions/XJDFCreatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@
package org.cip4.jdflib.extensions;

import org.cip4.jdflib.JDFTestCaseBase;
import org.cip4.jdflib.core.AttributeName;
import org.cip4.jdflib.core.JDFDoc;
import org.cip4.jdflib.core.JDFElement;
import org.cip4.jdflib.core.JDFElement.EnumValidationLevel;
import org.cip4.jdflib.core.KElement;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/**
*
Expand Down Expand Up @@ -82,24 +78,4 @@ public String toString()
return "XJDFCreatorTest: " + theHelper;
}

/**
*
*
*/
@Test
void testXJDFXPath()
{
final KElement root = new JDFDoc(XJDFConstants.XJDF).getRoot();
root.setAttribute(AttributeName.JOBID, "j");
root.setAttribute(AttributeName.TYPES, "Product");
root.setNamespaceURI(JDFElement.getSchemaURL(2, 0));
root.setXPathAttribute("GeneralID[@IDUsage=\"CatalogID\"]/@IDValue", "Cover");
root.setXPathAttribute("GeneralID[@IDUsage=\"foo\"]/@IDValue", "bar");
root.setXPathAttribute("ProductList/Product/@Amount", "1000");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource/Part/@Run", "Cover");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[Part/@Run=\"Cover\"]/RunList/FileSpec/@URL", "Cover");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[2]/Part/@Run", "Body");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[Part/@Run=\"Body\"]/RunList/FileSpec/@URL", "Body");
writeRoundTripX(root, "xpath.xml", EnumValidationLevel.Incomplete);
}
}
22 changes: 22 additions & 0 deletions src/test/java/org/cip4/jdflib/extensions/XJDFGeneratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import org.cip4.jdflib.core.AttributeName;
import org.cip4.jdflib.core.ElementName;
import org.cip4.jdflib.core.JDFConstants;
import org.cip4.jdflib.core.JDFDoc;
import org.cip4.jdflib.core.JDFElement;
import org.cip4.jdflib.core.JDFElement.EnumNodeStatus;
import org.cip4.jdflib.core.JDFElement.EnumValidationLevel;
import org.cip4.jdflib.core.JDFElement.EnumVersion;
Expand All @@ -66,6 +68,26 @@
class XJDFGeneratorTest extends XJDFCreatorTest
{
// TODO do we need an explicit incremental flag in the JDF proper and or sets
/**
*
*
*/
@Test
void testXJDFXPath()
{
final KElement root = new JDFDoc(XJDFConstants.XJDF).getRoot();
root.setAttribute(AttributeName.JOBID, "j");
root.setAttribute(AttributeName.TYPES, "Product");
root.setNamespaceURI(JDFElement.getSchemaURL(2, 0));
root.setXPathAttribute("GeneralID[@IDUsage=\"CatalogID\"]/@IDValue", "Cover");
root.setXPathAttribute("GeneralID[@IDUsage=\"foo\"]/@IDValue", "bar");
root.setXPathAttribute("ProductList/Product/@Amount", "1000");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource/Part/@Run", "Cover");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[Part/@Run=\"Cover\"]/RunList/FileSpec/@URL", "Cover");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[2]/Part/@Run", "Body");
root.setXPathAttribute("ResourceSet[@Name=\"RunList\"]/Resource[Part/@Run=\"Body\"]/RunList/FileSpec/@URL", "Body");
writeRoundTripX(root, "xpath.xml", EnumValidationLevel.Incomplete);
}

/**
*
Expand Down

0 comments on commit aebfc2c

Please sign in to comment.