package com.alexrnl.commons.arguments.parsers;

import static org.junit.Assert.assertEquals;

import java.lang.reflect.Field;

import org.junit.Before;
import org.junit.Test;

/**
 * Test suite for the {@link IntParser} class.
 * @author Alex
 */
public class IntParserTest {
	/** The integer parser */
	private IntParser	parser;
	/** The field to set */
	private int			field;
	/** The reference to the field to set */
	private Field	fieldReference;
	
	/**
	 * Set up test attributes.
	 * @throws SecurityException
	 *         if the field is not accessible.
	 * @throws NoSuchFieldException
	 *         if the field does not exists.
	 */
	@Before
	public void setUp () throws NoSuchFieldException, SecurityException {
		parser = new IntParser();
		fieldReference = IntParserTest.class.getDeclaredField("field");
		fieldReference.setAccessible(true);
	}
	
	/**
	 * Test method for {@link IntParser#parse(Object, Field, String)}.
	 */
	@Test
	public void testParse () {
		parser.parse(this, fieldReference, "8");
		assertEquals(8, field);
	}
	
	/**
	 * Test method for error cases of {@link IntParser#parse(Object, Field, String)}.
	 */
	@Test(expected = IllegalArgumentException.class)
	public void testParseIllegalArgument () {
		parser.parse(this, fieldReference, "manLau");
	}
}

@@ -490,24 +490,27 @@
 @throws 
-Security
+NoSuchField
 Exceptio
@@ -540,25 +540,23 @@
 eld 
-i
+doe
 s not 
-accessible
+exists
 .%0A%09 
@@ -561,35 +561,32 @@
 %09 * @throws 
-NoSuchField
+Security
 Exception%0A%09 
@@ -604,39 +604,41 @@
 f the field 
-doe
+i
 s not 
-exists
+accessible
 .%0A%09 */%0A%09@Bef

Fix javadoc