Day: January 20, 2009

  • Mockito to the Rescue

    After all the abuse in my previous post, I feel a bit guilty. Luckily Mockito provides a way out of that problem by allowing hamcrest matchers being used to verify arguments. Here we go: verify(listener).propertyChange( (PropertyChangeEvent)argThat( new HasEqualState( new PropertyChangeEvent(holder, “value”, “Old”, “New”)))); It is not nice, but it works. Of course I also had…

  • Hallmark of the Stupid: PropertyChangeEvent

    What troubles me with java is, that the implementors of its standard library utterly failed at setting an example. Java developers don’t know how to do proper christian oo, because every time they peek into the library sources they see C-ish hacks. Today I realised that PropertyChangeEvent is not implementing equals based on its value.…