01: /*
02: * Copyright (C) 2004, 2005 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 05. September 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.io.xml;
13:
14: import org.w3c.dom.Document;
15: import org.w3c.dom.Element;
16:
17: import javax.xml.parsers.DocumentBuilder;
18: import javax.xml.parsers.DocumentBuilderFactory;
19:
20: public class DomWriterTest extends AbstractDocumentWriterTest {
21:
22: private Document document;
23:
24: protected void setUp() throws Exception {
25: super .setUp();
26: final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory
27: .newInstance();
28: final DocumentBuilder documentBuilder = documentBuilderFactory
29: .newDocumentBuilder();
30: document = documentBuilder.newDocument();
31: writer = new DomWriter(document);
32: }
33:
34: protected DocumentReader createDocumentReaderFor(final Object node) {
35: return new DomReader((Element) node);
36: }
37:
38: // inherits tests from superclass
39: }
|