Blog Insights
Transactions Our Invisible Allies
Transactions are an essential component in enterprise software development. When your application works properly you rarely think about transactions. However, when things go wrong debugging transactions can be quite challenging. Instead of being reactive we need to proactively test our transactions. When I first got into the software...Would you start mocking me?
One of the primary principles of unit testing is to test a small piece of functionality in isolation. In order to achieve this, mock objects are often necessary. Historically using mocks could be quite painful. After using several mock frameworks, my favorite by far is Mockito. java Person mockPerson = Mockito.mock(PersonImpl.class); assertNotNull(mockPerson.getChildren()); assertEquals(0, mockPerson.getChildren().size()); assertFalse(mockPerson.isCitizen()); assertEquals(new...Developing a multithreaded test harness
You can't ignore the fact that web servers are multithreaded. We can hide as much as we want, but sooner or later you'll find yourself in the situation where your application works fine during development and testing; but once it hits production you start hearing about "funny" things happening. While...Sonar - Code Quality Analysis Tool
Sonar is a web based code quality analysis tool for Maven based Java projects. It covers a wide area of code quality check points which include: Architecture & Design, Complexity, Duplications, Coding Rules, Potential Bugs, Unit Test etc. Sonar has a rich set of features like what you would get...