wmaop / wm-jbehave

Unit Testing for webMethods Flow services with a Behavioural Driven style
https://github.com/wmaop/wm-jbehave/wiki
MIT License
5 stars 3 forks source link

Allow setting of exception message #6

Closed sysgen closed 7 years ago

sysgen commented 7 years ago

When causing an Exception to be thrown in a test, provide a way to give a String for the exception's message so you can verify it's your exception using exceptionMessage.contains("") call.

sysgen commented 7 years ago

When declaring exception can now add the message to the exception in java style: Given exception java.lang.RuntimeException("MyException") thrown ...etc

Note that the parsing is flexible and looks for an open bracket to declare the start of message and ignores the quotes so: Given exception java.lang.RuntimeException(MyException) thrown ... is equally valid

sysgen commented 7 years ago

Checked in and Available in 1.1.2 of wmaop release