##### Coverage Report - org.jbehave.core.io.CasePreservingResolver

Classes in this File | Line Coverage | Branch Coverage | Complexity
CasePreservingResolver |
100% | 5/5
N/A | N/A
| 1.0;1

1 |  |
     package org.jbehave.core.io;
2 |  |
3 |  |
     import org.jbehave.core.Embeddable;
4 |  |
5 |  |
     /**
6 |  |
      * <p>
7 |  |
      * Resolves story paths while preserving the Java class case, e.g.:
8 |  |
      * "org.jbehave.core.ICanLogin.java" -> "org/jbehave/core/ICanLogin.story".
9 |  |
      * </p>
10 |  |
      * <p>
11 |  |
      * By default, the {@link AbstractStoryPathResolver#DEFAULT_EXTENSION} is used
12 |  |
      * but this can be configured via the constructor so that we can resolve class
13 |  |
      * to use another or no extension at all, e.g.: "org/jbehave/core/ICanLogin".
14 |  |
      * </p>
15 |  |
      */
16 |  |
     public class CasePreservingResolver extends AbstractStoryPathResolver {
17 |  |
18 |  |
         public CasePreservingResolver() {
19 | 2 |
             this(DEFAULT_EXTENSION);
20 | 2 |
         }
21 |  |
22 |  |
         public CasePreservingResolver(String extension) {
23 | 5 |
             super(extension);
24 | 5 |
         }
25 |  |
26 |  |
         @Override
27 |  |
         protected String resolveName(Class<? extends Embeddable> embeddableClass) {
28 | 5 |
             return embeddableClass.getSimpleName();
29 |  |
         }
30 |  |
31 |  |
     }