/**
* Tests if getFields returns a list of {@link JDOFieldInfoNature}s.
*/
public void testGetAttributeTextElementFields() {
ClassInfo classInfo = new ClassInfo(new JClass("test"));
FieldInfoFactory factory = new FieldInfoFactory();
FieldInfo elementField = factory.createFieldInfo(new XSClass(
new JClass("Book")), "isbn");
// Set node type
elementField.addNature(XMLInfoNature.class.getName());
new XMLInfoNature(elementField).setNodeType(NodeType.ELEMENT);
// Set column name
elementField.addNature(JDOFieldInfoNature.class.getName());
JDOFieldInfoNature jdoField = new JDOFieldInfoNature(elementField);
jdoField.setColumnName("isbn");
classInfo.addFieldInfo(elementField);
FieldInfo attributeField = factory.createFieldInfo(new XSClass(
new JClass("Book")), "title");
// Set node type
attributeField.addNature(XMLInfoNature.class.getName());
new XMLInfoNature(attributeField).setNodeType(NodeType.ATTRIBUTE);
// Set column name
attributeField.addNature(JDOFieldInfoNature.class.getName());
jdoField = new JDOFieldInfoNature(attributeField);
jdoField.setColumnName("title");
classInfo.addFieldInfo(attributeField);
FieldInfo textField = factory.createFieldInfo(new XSClass(
new JClass("Book")), "price");
// Set node type
textField.addNature(XMLInfoNature.class.getName());
new XMLInfoNature(textField).setNodeType(NodeType.TEXT);
// Set column name
textField.addNature(JDOFieldInfoNature.class.getName());