Coverage Report
livenotificationrun
measured on November 5, 2007 4:04:16 PM CET
up to the title page
org . codecover . simplejavaapp . model . AppFile . loadAppFile
Statement Coverage Branch Coverage Loop Coverage Strict Condition Coverage
static AppFile loadAppFile(File file) throws ParserConfigurationException, SAXException, IOException 10 / 10 100 %
0 / 0 ---
2 / 6 33 %
0 / 0 ---
AppFile.java
260       static AppFile loadAppFile(File file) throws ParserConfigurationException,
261               SAXException, IOException {
262           AppFile appFile = AppFile.newFile();
263  
264           DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
265           factory.setNamespaceAware(true);
266           DocumentBuilder DocumentBuilder = factory.newDocumentBuilder();
267           Document xmlDoc = DocumentBuilder.parse(file);
268  
269           Element element = xmlDoc.getDocumentElement();
270  
271           NodeListIterable nodeListIterable = appFile.new NodeListIterable(
272                   element.getElementsByTagName("BookList"));
273           for (Node node : nodeListIterable) {
274               for (Node subNode : appFile.new NodeListIterable(((Element) node)
275                       .getElementsByTagName("Book"))) {
276                   appFile.addBook(Book.getBookFromXML((Element) subNode));
277               }
278           }
279  
280           appFile.setModified(false);
281           appFile.setPath(file.getAbsolutePath());
282  
283           return appFile;
284       }
created on November 17, 2007 7:07:00 PM CET with CodeCover