|
Hi,
I'm having problems doing some unit tests using the SASE extensions.
If I subscribe the test to the event, it receives the message send
with #fooEventMethod selector, but the tests fails (with an
exclamation icon in the SUnit browser).
If I subscribe container to itself, the test passes.
I guess I'm using SASE Testing wrong. I've always used it to test
presenters and other related stuff, but never the events between
objects.
ContainerTest>>testAddSubstanceEvents
"Tests the addition of a substance to the container."
| substance |
substance := Substance newNamed: 'Test substance'.
container := Container newNamed: 'Test container'.
container when: #substancesChanged send: #fooEventMethod to: self.
self
should: [container addSubstance: substance amount: 11kg]
trigger: #substancesChanged
against: self
ContainerTest>>fooEventMethod
"Do nothing"
Best Regards.
|