When running unit test, you are not supposed to be checking the logs, generated by the test framework. One of the first principles of the test driving development paradigm is, that you should be able to run your tests automatically, without any developer interaction. You also should not be forced to check any output besides… Continue reading Using logging in your unit test
Month: December 2016
Custom toString builder for Eclipse
If you are not satisfied the way, how Eclipse generates the toString method for your classes, and you are not so lucky to use the Lombok project, you have the possibility to set custom toString builder for Eclipse. In the Generate toString dialog you can configure the code style. By clicking on the Configure… Continue reading Custom toString builder for Eclipse
Use standard Java APIs instead of reimplementing it
While we are joyfully solving our tasks, we tend to forget, how much help we can get form standard Java API. Before implementing something very exciting, elegant and nice, it is always a useful tactic to stopĀ ourselves, take a big breath, and check if the function is already available somewhere. While making code reviews for… Continue reading Use standard Java APIs instead of reimplementing it