PropGroupImpl extends XliffElementImpl implements PropGroup { public List<Prop> getProps() { return Collections.unmodifiableList(props); } PropGroupImpl(List<Prop> props);  PropGroupImpl(Element elem); @Override List<? extends Node> getChildren(); Name getPropGroupName(); List<Prop> getProps(); void setPropGroupName(Name name); void setProps(List<Prop> props);  }
@Test public void testCountGroupImplListOfProp() { PropGroupImpl pg = createDefaultPropGroup(); assertEquals(createDefaultProps(), pg.getProps()); }
@Test public void testPropGroupImplElement() { Document doc = Utils.createDocument(); Element elem = doc.createElementNS(XLIFF_12_NAMESPACE, "prop-group"); try { new PropGroupImpl(elem); fail("Expected ConstraintViolationException"); } catch (ConstraintViolationException e) { } elem.appendChild(createDefaultProp().asXmlNode(doc)); try { PropGroupImpl pg = new PropGroupImpl(elem); assertEquals(createDefaultProps(), pg.getProps()); } catch (ConstraintViolationException e) { fail("Did not expect ConstraintViolationException"); } elem.appendChild(doc.createElementNS("ns", "name")); try { new PropGroupImpl(elem); fail("Expected ConstraintViolationException"); } catch (ConstraintViolationException e) { } }