Statement Coverage | Branch Coverage | Loop Coverage | Strict Condition Coverage | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
public Element getXMLRepresentation(Document xmlDoc) | 6 / 6 | 100 % |
|
1 / 2 | 50 % |
|
0 / 0 | --- | 0 / 1 | 0 % |
|
Book.java | ||
---|---|---|
171 | public Element getXMLRepresentation(Document xmlDoc) { | |
172 | if (xmlDoc == null) { | |
173 | throw new NullPointerException("xmlDoc == null"); | |
174 | } | |
175 | ||
176 | Element bookElement = xmlDoc.createElement("Book"); | |
177 | ||
178 | bookElement.setAttribute(AUTHOR, getAuthor()); | |
179 | bookElement.setAttribute(ID, getId()); | |
180 | bookElement.setAttribute(ISBN, getIsbn()); | |
181 | bookElement.setAttribute(NAME, getName()); | |
182 | bookElement.setAttribute(YEAR, Integer.toString(getYear())); | |
183 | ||
184 | return bookElement; | |
185 | } |