| Statement Coverage | Branch Coverage | Loop Coverage | Strict Condition Coverage | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public static Book getBookFromXML(Element element) | 10 / 10 | 100 % | 
                         |    
                                            0 / 0 | --- | 0 / 0 | --- | 0 / 0 | --- | |||
| Book.java | ||
|---|---|---|
| 194 | public static Book getBookFromXML(Element element) { | |
| 195 | String author = element.getAttribute(AUTHOR); | |
| 196 | String id = element.getAttribute(ID); | |
| 197 | String isbn = element.getAttribute(ISBN); | |
| 198 | String name = element.getAttribute(NAME); | |
| 199 | String year = element.getAttribute(YEAR); | |
| 200 | ||
| 201 | Book book = new Book(id); | |
| 202 | ||
| 203 | book.setAuthor(author); | |
| 204 | book.setIsbn(isbn); | |
| 205 | book.setName(name); | |
| 206 | book.setYear(Integer.parseInt(year)); | |
| 207 | ||
| 208 | return book; | |
| 209 | } | |