Arrogance, humility and software development Jan 23, 2010 One’s true greatness is inversely proportional to behaving as if one were great, just as one’s true smallness is inversely proportional to behaving as if one were small. (Anonymous) The more I learn, the more I realize I don’t know. (Albert Einstein) You should have heard about how arrogant developers are terrible in communication with team members and client or you should have met an arrogant developer who never listens anyone else, thinks he knows everything and who is also very rude. ...
Verify details of argument passed to the mocked object Jan 22, 2010 Mockito, my favoritte mock library, introduced ArgumentCaptor with 1.8. ArgumentCaptor allows you to capture and store arguments passed the mocked methods. The captured arguments are available with the methods like getValue and getValues. So, the arguments can be easily verified by using standart JUnit assertions. ArgumentCaptor argument = ArgumentCaptor.forClass(Person.class); verify(mock).doSomething(argument.capture()); assertEquals("John", argument.getValue().getName())
Value Objects Dec 26, 2009 The value objects are simple but very useful objects. Value object, one of the powerful concept from DDD, is an object that describes a characteristic of a thing. According Eric Evans, An object that represents a descriptive aspect of the domain with no conceptual identity is called a value object. Value objects are instantiated to represent elements of the design that we care about only for what they are, not who or which they are. ...