NonXliffElementImpl extends ElementImpl implements NonXliffElement { @Override public List<? extends Node> getChildren() { return Collections.unmodifiableList(children); } NonXliffElementImpl(String namespaceUri, String prefix, String name,
			Collection<? extends Attribute> attributes, List<? extends Node> children);  NonXliffElementImpl(org.w3c.dom.Element xmlElement); @Override List<? extends Node> getChildren();  }
@Test public void testNonXliffElementImplElement() { Document doc = Utils.createDocument(); Element elem = doc.createElementNS(XLIFF_12_NAMESPACE, "name"); try { new NonXliffElementImpl(elem); fail("Expected ConstaintViolationException"); } catch (ConstraintViolationException e) { } elem = doc.createElementNS("ns", "name"); elem.appendChild(doc.createElementNS("ns", "something")); elem.appendChild(doc.createTextNode("text")); try { NonXliffElementImpl nxe = new NonXliffElementImpl(elem); List<? extends Node> children = nxe.getChildren(); assertEquals(new Integer(2), new Integer(children.size())); NonXliffElementImpl c1 = new NonXliffElementImpl("ns", null, "something", createEmptyAttributes(), createEmptyChildren()); assertEquals(c1, children.get(0)); assertEquals(new TextImpl("text"), children.get(1)); } catch (ConstraintViolationException e) { fail("Did not expect ConstaintViolationException"); } }
@Test public void testGetChildren() { NonXliffElementImpl nxe = createDefaultNonXliffElement(); assertEquals(createDefaultChildren(), nxe.getChildren()); }