|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (JMOCK-186) Specify a custom expectation message with a because() clause or such like?Specify a custom expectation message with a because() clause or such like?
-------------------------------------------------------------------------- Key: JMOCK-186 URL: http://jira.codehaus.org/browse/JMOCK-186 Project: jMock Issue Type: Wish Components: Library Reporter: Chris Corbyn Priority: Trivial Maybe this already exists and I've missed it when reading over the documentation, but instead of the generic output when expectations are not met, it would be nice if there was a way to add your own message. You could string format it with "%s" or something to include the generic message too: context.checking(new Expectations() {{ one(myObj).foobar(); inSequence(s); will(returnValue(42)); because("System cannot proceed before foobar() is invoked: %s"); }}); It sort of allows the expectations to be documented like a story (BDD). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Commented: (JMOCK-186) Specify a custom expectation message with a because() clause or such like?[ http://jira.codehaus.org/browse/JMOCK-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139135#action_139135 ] Nat Pryce commented on JMOCK-186: --------------------------------- Because of the jMock's semantics, attaching a description to an expectation doesn't make sense. E..g. What happens if there are two "because" clauses? What should be displayed when an expectation is not met? The only thing that makes sense is to attach a description to *all* the expectations. But that's what the name of the test is for. > Specify a custom expectation message with a because() clause or such like? > -------------------------------------------------------------------------- > > Key: JMOCK-186 > URL: http://jira.codehaus.org/browse/JMOCK-186 > Project: jMock > Issue Type: Wish > Components: Library > Reporter: Chris Corbyn > Priority: Trivial > > Maybe this already exists and I've missed it when reading over the documentation, but instead of the generic output when expectations are not met, it would be nice if there was a way to add your own message. You could string format it with "%s" or something to include the generic message too: > context.checking(new Expectations() {{ > one(myObj).foobar(); inSequence(s); will(returnValue(42)); because("System cannot proceed before foobar() is invoked: %s"); > }}); > It sort of allows the expectations to be documented like a story (BDD). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Closed: (JMOCK-186) Specify a custom expectation message with a because() clause or such like?[ http://jira.codehaus.org/browse/JMOCK-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nat Pryce closed JMOCK-186. --------------------------- Assignee: Nat Pryce Resolution: Won't Fix > Specify a custom expectation message with a because() clause or such like? > -------------------------------------------------------------------------- > > Key: JMOCK-186 > URL: http://jira.codehaus.org/browse/JMOCK-186 > Project: jMock > Issue Type: Wish > Components: Library > Reporter: Chris Corbyn > Assignee: Nat Pryce > Priority: Trivial > > Maybe this already exists and I've missed it when reading over the documentation, but instead of the generic output when expectations are not met, it would be nice if there was a way to add your own message. You could string format it with "%s" or something to include the generic message too: > context.checking(new Expectations() {{ > one(myObj).foobar(); inSequence(s); will(returnValue(42)); because("System cannot proceed before foobar() is invoked: %s"); > }}); > It sort of allows the expectations to be documented like a story (BDD). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |