Studyon Minte9.com
JUnit




Assert Array



	%java
		package testexample;

		import java.util.Arrays;
		import org.junit.Assert.*;
		import junit.framework.*;

		public class Testexample extends TestCase {

		    public static void main(String[] args) {

			assertTrue(Arrays.equals(new int[]{1,2,3}, arrSort(new int[]{1,2,3})));
		    }

		    public static int[] arrSort(int[] nums) {

			return nums;
		    }
		}


http://stackoverflow.com/questions/3457941/using-assertarrayequals-in-unit-tests