##### Coverage Report - org.jbehave.core.io.odf.LoadOdtFromURL

Classes in this File | Line Coverage | Branch Coverage | Complexity
LoadOdtFromURL |
100% | 4/4
N/A | N/A
| 4.0;4

1 |  |
     package org.jbehave.core.io.odf;
2 |  |
3 |  |
     import org.jbehave.core.io.InvalidStoryResource;
4 |  |
     import org.jbehave.core.io.LoadFromURL;
5 |  |
6 |  |
     import static org.jbehave.core.io.odf.OdfUtils.loadOdt;
7 |  |
     import static org.jbehave.core.io.odf.OdfUtils.parseOdt;
8 |  |
9 |  |
     /**
10 |  |
      * Loads ODT story resources from URL
11 |  |
      */
12 | 3 |
     public class LoadOdtFromURL extends LoadFromURL {
13 |  |
14 |  |
         public String loadResourceAsText(String resourcePath) {
15 |  |
             try {
16 | 3 |
                 return parseOdt(loadOdt(resourceAsStream(resourcePath)));
17 | 2 |
             } catch (Exception cause) {
18 | 2 |
                 throw new InvalidStoryResource(resourcePath, cause);
19 |  |
             }
20 |  |
         }
21 |  |
22 |  |
     }