As a Java developer there are many instances where you find yourself wanting to separate running unit and integration tests. Here is a simple solution to that problem. The following is a more clear writeup of what is given by JUnit Team. Step1: Create a JUnit category. 1 2 3 package com.rushis.test; public interface IntegrationTest […]

Read More →

Java Architecture for XML Binding (JAXB) allows Java developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and, to unmarshal XML back into Java objects. Let’s quickly dive into an example: Here is the xml file <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> […]

Read More →

Here is the java code and JUnit test cases for simple math expression. The math expression can have numbers and basic operators like plus, minus, division, multiplication. Well that’s very simple to compute. However add in the parentheses into the scheme of things and it gets a little more interesting. The operator precedence and parentheses […]

Read More →