SVGCanvasProvider extends AbstractXMLGeneratingCanvasProvider { public Document getDOM() { return this.doc; } SVGCanvasProvider(DOMImplementation domImpl, boolean useNamespace, String namespacePrefix,
            Orientation orientation);  SVGCanvasProvider(DOMImplementation domImpl, boolean useNamespace,
            Orientation orientation);  SVGCanvasProvider(DOMImplementation domImpl, String namespacePrefix,
            Orientation orientation);  SVGCanvasProvider(boolean useNamespace, Orientation orientation); @Deprecated  SVGCanvasProvider(boolean useNamespace, int orientation);  SVGCanvasProvider(String namespacePrefix, Orientation orientation);  SVGCanvasProvider(Orientation orientation); Document getDOM(); DocumentFragment getDOMFragment(); @Override void establishDimensions(BarcodeDimension dim); @Override void deviceFillRect(double x, double y, double w, double h); @Override void deviceText(String text, double x1, double x2, double y1,
            String fontName, double fontSize, TextAlignment textAlign); boolean isNamespaceEnabled(); String getNamespacePrefix(); static final String SVG_NAMESPACE; }
@Test public void testGetDOM() { System.out.println("getDOM - default"); SVGCanvasProvider instance = new SVGCanvasProvider(Orientation.ZERO); String expResult = "<svg xmlns=\"http: Document result = instance.getDOM(); assertEquals(expResult, getStringFromDoc(result)); System.out.println("getDOM - no namespace"); instance = new SVGCanvasProvider(false, Orientation.ZERO); expResult = "<svg><g fill=\"black\" stroke=\"none\"/></svg>"; result = instance.getDOM(); assertEquals(expResult, getStringFromDoc(result)); System.out.println("getDOM - with namespace and prefix"); instance = new SVGCanvasProvider("svg", Orientation.ZERO); expResult = "<svg:svg xmlns:svg=\"http: result = instance.getDOM(); assertEquals(expResult, getStringFromDoc(result)); try { System.out.println("getDOM - without namespace but prefix"); instance = new SVGCanvasProvider(null, false, "foo", Orientation.ZERO); fail("not allowed combination of parameters"); } catch (IllegalArgumentException e) { } try { System.out.println("getDOM - with empty prefix"); instance = new SVGCanvasProvider(null, true, "", Orientation.ZERO); fail("not allowed empty prefix"); } catch (IllegalArgumentException e) { } }