Hi everybody,
I'm writting some behaviours to my application and I think I found a bug on
release 1.0.1 when an exception is expected.
The following statement:
public void
shouldReturnOperationDeniedErrorWhenAppendingACommentToADisabledTopic()
throws Exception {
runAndCatch(OperationDeniedException.class, new Block() {
public void run() throws Exception {
Topic topic = new Topic();
topic.setEnabled(false);
topic.append(new Comment());
}
});
}
I implemented the code to make the behaviour verification succeeds:
public void append(Comment comment) {
if (!isEnabled()) {
throw new OperationDiniedException();
}
if (comments == null) {
comments = new ArrayList<Comment>(1);
}
comments.add(comment);
}
But it's not working. It's still failing.
At work I'm using version 1.0 and it works, but at home with a newer version
it's not working.
Anyone could help me with this?
Kind regards.
--
______________________
Alexandre Martins Nunes
http://m.artins.net