xmlAssertIsomorphicContent(parseString(expected), parseString(xml));
}
public void testReadCategories() throws Exception {
BeanReader beanReader = new BeanReader();
beanReader.getXMLIntrospector().setConfiguration(categoriesIntrospectionConfiguration);
beanReader.setBindingConfiguration(noIDsBindingConfiguration);
beanReader.registerBeanClass(Categories.class);
String xml = "<?xml version='1.0'?><Categories>" +
"<Category><Name>Runs</Name></Category>" +
"<Category><Name>Innings</Name></Category>" +
"<Category><Name>Dismissals</Name></Category>" +
"<Category><Name>High Score</Name></Category>" +
"<Category><Name>Average</Name></Category>" +
"</Categories>";
StringReader in = new StringReader(xml);
Categories bean = (Categories) beanReader.parse(in);
assertEquals("5 categories", 5, bean.size());
Iterator it = bean.getCategories();
assertEquals("Runs category", new Category("Runs"), it.next());