b.add("one");
b.add("1");
b.add(DATE_FORMAT.parse("2011-06-20 11:11:11"));
features.add(b.buildFeature(null));
ValueCollectionType vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
PropertyValueCollection valueCollection = new PropertyValueCollection(features, featureType.getDescriptor("geom"), filterFac.property("geom"));
vc.getMember().add(valueCollection);
Document doc = encode(vc, WFS.ValueCollection);
assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
assertEquals(2, getElementsByQName(doc, WFS.member).getLength());
NodeList geoms = getElementsByQName(doc, new QName("http://geotools.org", "geom"));
assertEquals(2, geoms.getLength());
assertNotNull(getElementByQName((Element)geoms.item(0), GML.Point));
assertNotNull(getElementByQName((Element)geoms.item(1), GML.Point));
vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
vc.getMember().add(new PropertyValueCollection(features, featureType.getDescriptor("str"), filterFac.property("str")));
doc = encode(vc, WFS.ValueCollection);
assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
assertEquals(2, getElementsByQName(doc, WFS.member).getLength());
NodeList strs = getElementsByQName(doc, new QName("http://geotools.org", "str"));
assertEquals(2, strs.getLength());
Set vals = new HashSet(Arrays.asList("zero", "one"));
vals.remove(strs.item(0).getFirstChild().getNodeValue());
vals.remove(strs.item(1).getFirstChild().getNodeValue());
assertTrue(vals.isEmpty());
vc = Wfs20Factory.eINSTANCE.createValueCollectionType();
vc.getMember().add(new PropertyValueCollection(features, featureType.getDescriptor("date"), filterFac.property("date")));
doc = encode(vc, WFS.ValueCollection);
assertEquals("wfs:ValueCollection", doc.getDocumentElement().getNodeName());
assertEquals(2, getElementsByQName(doc, WFS.member).getLength());