/**
* Tests if getFields returns a list of {@link JDOFieldInfoNature}s.
*/
public void testGetElementFieldsWithMoreThanOneField() {
ClassInfo classInfo = new ClassInfo(new JClass("test"));
FieldInfoFactory factory = new FieldInfoFactory();
FieldInfo isbn = factory.createFieldInfo(new XSClass(
new JClass("Book")), "isbn");
FieldInfo title = factory.createFieldInfo(new XSClass(
new JClass("Book")), "title");
isbn.addNature(JDOFieldInfoNature.class.getName());
title.addNature(JDOFieldInfoNature.class.getName());
JDOFieldInfoNature jdoIsbn = new JDOFieldInfoNature(isbn);
JDOFieldInfoNature jdoTitle = new JDOFieldInfoNature(title);
jdoIsbn.setColumnName("isbn");
jdoIsbn.setColumnType("integer");
jdoTitle.setColumnName("title");
jdoTitle.setColumnType("varchar");
classInfo.addFieldInfo(isbn);
classInfo.addFieldInfo(title);
classInfo.addNature(JDOClassInfoNature.class.getName());
JDOClassInfoNature jdo = new JDOClassInfoNature(classInfo);
List jdoFields = jdo.getFields();
assertEquals(2, jdoFields.size());