public class EnumerationTest extends TestCase {
public void testEnumeration(){
CountPlacesInRect countPlacesInRect = new CountPlacesInRect();
countPlacesInRect.setLowerright("lowerright");
countPlacesInRect.setUpperleft("upperleft");
countPlacesInRect.setPtype(PlaceType.River);
try {
OMElement omElement = countPlacesInRect.getOMElement(CountPlacesInRect.MY_QNAME,OMAbstractFactory.getOMFactory());
String omElementString = omElement.toStringWithConsume();
System.out.println("OM String ==> " + omElementString);
XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
CountPlacesInRect newObject = CountPlacesInRect.Factory.parse(xmlReader);
assertEquals(countPlacesInRect.getPtype(),PlaceType.River);
} catch (Exception e) {
assertFalse(true);
}
}