*/
@Test
public void testTextSelectionContainerElement() {
search = new TextNavigation("TextSelectionContainer", doc);
if (search.hasNext()) {
TextSelection item = (TextSelection) search.nextSelection();
OdfElement container = item.getContainerElement();
Node childNode = container.getFirstChild();
while (childNode != null) {
String containerText = childNode.getTextContent();
Assert.assertFalse(container.getTextContent().equals(containerText));
childNode = childNode.getNextSibling();
}
} else {
Assert.fail("Navigation search nothing.");
}
// test selected table cell content in draw:frame.
search = new TextNavigation("Task", doc);
if (search.hasNext()) {
TextSelection item = (TextSelection) search.nextSelection();
OdfElement container = item.getContainerElement();
Node childNode = container.getFirstChild();
while (childNode != null) {
String containerText = childNode.getTextContent();
Assert.assertFalse(container.getTextContent().equals(containerText));
childNode = childNode.getNextSibling();