Clover coverage report - Clover results for XOM 1.2d1
Coverage timestamp: Wed Feb 8 2006 08:31:33 EST
file stats: LOC: 119   Methods: 14
NCLOC: 60   Classes: 8
 
 Source file Conditionals Statements Methods TOTAL
ANodeFactory.java - 100% 100% 100%
coverage
 1    /* Copyright 2005 Elliotte Rusty Harold
 2   
 3    This library is free software; you can redistribute it and/or modify
 4    it under the terms of version 2.1 of the GNU Lesser General Public
 5    License as published by the Free Software Foundation.
 6   
 7    This library is distributed in the hope that it will be useful,
 8    but WITHOUT ANY WARRANTY; without even the implied warranty of
 9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 10    GNU Lesser General Public License for more details.
 11   
 12    You should have received a copy of the GNU Lesser General Public
 13    License along with this library; if not, write to the
 14    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 15    Boston, MA 02111-1307 USA
 16   
 17    You can contact Elliotte Rusty Harold by sending e-mail to
 18    elharo@metalab.unc.edu. Please include the word "XOM" in the
 19    subject line. The XOM home page is located at http://www.xom.nu/
 20    */
 21    package nu.xom.tests;
 22   
 23    import nu.xom.*;
 24    import nu.xom.Attribute.Type;
 25   
 26    class ANodeFactory extends NodeFactory {
 27   
 28  2 public Nodes makeAttribute(String name, String URI, String value, Type type) {
 29  2 return new Nodes(new AnAttribute(name, URI, value, type));
 30    }
 31   
 32  2 public Nodes makeComment(String data) {
 33  2 return new Nodes(new AComment(data));
 34    }
 35   
 36  7 public Nodes makeText(String text) {
 37  7 return new Nodes(new AText(text));
 38    }
 39   
 40  1 public Nodes makeDocType(String rootElementName, String publicID, String systemID) {
 41  1 return new Nodes(new ADocType(rootElementName, publicID, systemID));
 42    }
 43   
 44  1 public Nodes makeProcessingInstruction(String target, String data) {
 45  1 return new Nodes(new AProcessingInstruction(target, data));
 46    }
 47   
 48  1 public Document startMakingDocument() {
 49  1 return new ADocument(new AElement("foo", "http://www,examle.com"));
 50    }
 51   
 52  8 public Element startMakingElement(String name, String namespace) {
 53  8 return new AElement(name, namespace);
 54    }
 55   
 56    }
 57   
 58   
 59    class AElement extends Element {
 60   
 61  9 public AElement(String name, String uri) {
 62  9 super(name, uri);
 63    }
 64   
 65    }
 66   
 67   
 68    class ADocument extends Document {
 69   
 70  1 public ADocument(Element root) {
 71  1 super(root);
 72    }
 73   
 74    }
 75   
 76   
 77    class AText extends Text {
 78   
 79  7 public AText(String text) {
 80  7 super(text);
 81    }
 82   
 83    }
 84   
 85   
 86    class AComment extends Comment {
 87   
 88  2 public AComment(String text) {
 89  2 super(text);
 90    }
 91   
 92    }
 93   
 94   
 95    class AProcessingInstruction extends ProcessingInstruction {
 96   
 97  1 public AProcessingInstruction(String target, String data) {
 98  1 super(target, data);
 99    }
 100   
 101    }
 102   
 103   
 104    class ADocType extends DocType {
 105   
 106  1 public ADocType(String rootElementName, String publicID, String systemID) {
 107  1 super(rootElementName, publicID, systemID);
 108    }
 109   
 110    }
 111   
 112   
 113    class AnAttribute extends Attribute {
 114   
 115  2 public AnAttribute(String name, String URI, String value, Type type) {
 116  2 super(name, URI, value, type);
 117    }
 118   
 119    }