JBehave

Scenario's in the default package cause NullPointerException

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0, 2.0.1, 2.1
  • Fix Version/s: 2.2
  • Component/s: Core
  • Labels:
    None
  • Environment:
    Windows XP
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

I'm playing around with JBehave, and encountered the folloing NullPointerException

Testcase: testScenario(HeyHeyMyMy): Caused an ERROR
null
java.lang.NullPointerException
at org.jbehave.scenario.parser.UnderscoredCamelCaseResolver.resolve(UnderscoredCamelCaseResolver.java:37)
at org.jbehave.scenario.parser.ClasspathScenarioDefiner.loadInputStreamFor(ClasspathScenarioDefiner.java:52)
at org.jbehave.scenario.parser.ClasspathScenarioDefiner.loadScenarioDefinitionsFor(ClasspathScenarioDefiner.java:47)
at org.jbehave.scenario.AbstractScenario.runScenario(AbstractScenario.java:69)
at org.jbehave.scenario.JUnitScenario.runScenario(JUnitScenario.java:49)
at org.jbehave.scenario.JUnitScenario.testScenario(JUnitScenario.java:64)

I've enclosed a patch for you consideration

Activity

Hide
Mauro Talevi added a comment -

Corrected versions

Show
Mauro Talevi added a comment - Corrected versions
Hide
Mauro Talevi added a comment -

Committed fix but not the unit test as I could not get it to recognise the default package scenario class.

Show
Mauro Talevi added a comment - Committed fix but not the unit test as I could not get it to recognise the default package scenario class.
Hide
Mauro Talevi added a comment -

Added example to verify behaviour.

Show
Mauro Talevi added a comment - Added example to verify behaviour.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: