/**
 * 
 */
package com.scg.util;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 * @author Brian Stamm
 *
 */
public class PersonalNameTests {

	private String lastName = "Cicero";
	private String firstName = "Marcus";
	private String middleName = "Tullius";
	private String partName = lastName + ", " + firstName;
	private String fullName = lastName + ", " + firstName + " " + middleName;
	
	
	@Test
	public void testTwoParameterConstructor() {
		PersonalName tester = new PersonalName(lastName, firstName);
		assertEquals(tester.toString(), partName);
	}

	@Test
	public void testThreeParametterConstructor() {
		PersonalName tester = new PersonalName(lastName, firstName, middleName);
		assertEquals(tester.toString(), fullName);
	}
	
	@Test
	public void testGetLastName() {
		PersonalName tester = new PersonalName(lastName, firstName, middleName);
		assertEquals(tester.getLastName(),lastName);
	}
	
	@Test
	public void testSetLastName() {
		PersonalName tester = new PersonalName();
		tester.setLastName(lastName);
		assertEquals(tester.getLastName(),lastName);
	}
	
	@Test
	public void testGetFirstName() {
		PersonalName tester = new PersonalName(lastName, firstName, middleName);
		assertEquals(tester.getFirstName(),firstName);
	}
	
	@Test
	public void testSetFirstName() {
		PersonalName tester = new PersonalName();
		tester.setFirstName(firstName);
		assertEquals(tester.getFirstName(),firstName);
	}
	
	@Test
	public void testGetMiddleName() {
		PersonalName tester = new PersonalName(lastName, firstName, middleName);
		assertEquals(tester.getMiddleName(),middleName);
	}
	
	@Test
	public void testSetMiddleName() {
		PersonalName tester = new PersonalName();
		tester.setMiddleName(middleName);
		assertEquals(tester.getMiddleName(),middleName);
	}
	
	@Test
	public void testEquals() {
		PersonalName testerOne = new PersonalName(lastName, firstName, middleName);
		PersonalName testerTwo = new PersonalName(lastName, firstName, middleName);
		PersonalName testerThree = new PersonalName(firstName, lastName);
		boolean answerOne = testerOne.equals(testerTwo);
		assertEquals(answerOne,true);
		boolean answerTwo = testerOne.equals(testerThree);
		assertEquals(answerTwo,false);
		
	}

}

@@ -1,16 +1,4 @@
-/**%0A * %0A */%0A
 pack
@@ -79,16 +79,44 @@
 t;%0A%0A/**%0A
+ * This tests PersonalName.%0A
  * @auth
@@ -134,11 +134,8 @@
 amm%0A
- *%0A
  */%0A
@@ -167,17 +167,56 @@
 Tests %7B%0A
+%09%0A%09//Private variables used for testing
 %0A
-
 %09private
@@ -456,16 +456,66 @@
 ame;%0A%09%0A%09
+/**%0A%09* Tests constructor taking two arguments.%0A%09*/
 %0A%09@Test%0A
@@ -670,17 +670,72 @@
 me);%0A%09%7D%0A
+%09%0A%09/**%0A%09* Tests constructor taking three arguments.%0A%09*/
 %0A
-
 %09@Test%0A%09
@@ -898,32 +898,70 @@
 fullName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method getLastName()%0A%09*/%0A
 %09@Test%0A%09public v
@@ -1103,32 +1103,92 @@
 lastName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method setLastName(), passing new value in%0A%09*/%0A
 %09@Test%0A%09public v
@@ -1331,32 +1331,71 @@
 lastName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method getFirstName()%0A%09*/%0A
 %09@Test%0A%09public v
@@ -1540,32 +1540,93 @@
 irstName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method setFirstName(), passing new value in%0A%09*/%0A
 %09@Test%0A%09public v
@@ -1774,32 +1774,72 @@
 irstName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method getMiddleName()%0A%09*/%0A
 %09@Test%0A%09public v
@@ -1987,32 +1987,94 @@
 ddleName);%0A%09%7D%0A%09%0A
+%09/**%0A%09* Test method setMiddleName(), passing new value in%0A%09*/%0A
 %09@Test%0A%09public v
@@ -2233,18 +2233,109 @@
 me);%0A%09%7D%0A
-
 %09%0A
+%09/**%0A%09* Test method equal(), with two PersonalName that are the same and one different%0A%09*/%0A
 %09@Test%0A%09

update PersonalName test by adding comments