private void createStory(Description description) { if (description.getAnnotation(Story.class) != null) createStoryFromAnnotation(description.getAnnotation(Story.class)); else { createStoryFromDescription(description.getDisplayName()); } }
private boolean isItSingleScenario(Description description) { try { return description.getMethodName() != null; } catch (NoSuchMethodError e) { // junit 4.5 return description.getDisplayName() != null; } }
private String createScenarioNameFromTestMethodName( Description description, Parameters parametersAnnotation) { try { return decamelise(description.getMethodName()); } catch (NoSuchMethodError e) { // junit 4.5 return decamelise(description.getDisplayName()); } }