Blog

Java Naming Standard and Conventions

Categories :
This naming convention is collected from a number of sources, individual experience, local requirements/needs, as well as suggestions given in the references. Main reason for introducing a new guideline rather that just referring to those one is reviewing the existing style and using the new IDEs features to make code readability the most. Each recommendation is numbered to make it easier to refer to during code reviews.

Force Maven deploy multi module project only if all modules build successfully

Tags :
Categories :
Maven deploy plugin version 2.8 has a property named deployAtEnd that determines whether every project should be deployed during its own deploy-phase or at the end of the multi-module build. If set to true and the build fails, none of the reactor projects is deployed. The default value is for this property is false.

Mocking vs Fake Objects

Categories :
Sometimes in a large scale projects we need to replace some layers that are not implemented yet with something to enable us testing upper layers. Most of the time we hear about Mocking as a solution. But actually there are other acceptable solutions. Here we examine these solutions.

Test Doubles: Dummy Object, Test Stub, Mock objects and Fake Objects

Tags :
Categories :
What are Dummy Object, Test Stub, Mock objects and Fake Objects and why they are known as test doubles? In unit testing, we need to control the state or behavior of depended component of the unit under test. We need to put it in a defined state so that a specific path of the unit under test could be tested. On the other hand, always we can not examine the state of the unit under test or its related components and we need to examine the behavior of them to find out about the success or failure of our tests. Test doubles are here to be used in these circumstances.

Code coverage Arquilian and Jacoco

Categories :
Enabling code coverage analysis for integration tests by Arquilian and Jacoco is sometimes boring. Here we document our experiments on using Jacoco with Arquilian for Code coverage.

All Categories