Unit Test Code
ArrayUtils.java - imports and start of class
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.celestial.tdd.demo.v1; import static org.hamcrest.CoreMatchers.is; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; import org.junit.Rule; import org.junit.rules.ExpectedException; /** * * @author Selvyn */ public class ArrayUtilsTest { ...
Iteration 1
ArrayUtils.java - iteration 1
public class ArrayUtilsTest { @Test public void find_highest_in_array_of_one() { // Arrange int array[] = { 10 }; ArrayUtils arrayUtils = new ArrayUtils(); // Act int result = arrayUtils.findHighest(array); // Assert assertThat(result, is(10)); } }
Add Comment