src/textgen/MyLinkedListTester.java
/** Test the size of the list 
	 * @throws Exception */
Test the size of the list
@throws Exception
Test the size of the list @throws Exception
@Test
	public void testSize() throws Exception
	{
		this.setUp();
		assertEquals("get size of an empty list", 0,emptyList.size);
		assertEquals("get size of a list before add ",2,shortList.size);
		assertEquals("get size of a list after add ",true,shortList.add("C"));
		assertEquals("get size of a list before add ",3,shortList.size);
		assertEquals("get size of a list after add ","A",shortList.remove(0));
		assertEquals("get size of a list before add ",2,shortList.size);
		assertEquals("get size of a list after add ",true,shortList.add("D"));
		assertEquals("get size of a list after add ","C",shortList.remove(1));
		assertEquals("get size of a list before add ",2,shortList.size);
		assertEquals("get size of a list after add ","B",shortList.remove(0));
		assertEquals("get size of a list before add ",1,shortList.size);
		assertEquals("get size of a list before add ","D",shortList.remove(0));
		assertEquals("get size of a list before add ",0,shortList.size);
	}
@ Test public void testSize ( ) throws Exception { this . setUp ( ) ; assertEquals ( "get size of an empty list" , 0 , emptyList . size ) ; assertEquals ( "get size of a list before add " , 2 , shortList . size ) ; assertEquals ( "get size of a list after add " , true , shortList . add ( "C" ) ) ; assertEquals ( "get size of a list before add " , 3 , shortList . size ) ; assertEquals ( "get size of a list after add " , "A" , shortList . remove ( 0 ) ) ; assertEquals ( "get size of a list before add " , 2 , shortList . size ) ; assertEquals ( "get size of a list after add " , true , shortList . add ( "D" ) ) ; assertEquals ( "get size of a list after add " , "C" , shortList . remove ( 1 ) ) ; assertEquals ( "get size of a list before add " , 2 , shortList . size ) ; assertEquals ( "get size of a list after add " , "B" , shortList . remove ( 0 ) ) ; assertEquals ( "get size of a list before add " , 1 , shortList . size ) ; assertEquals ( "get size of a list before add " , "D" , shortList . remove ( 0 ) ) ; assertEquals ( "get size of a list before add " , 0 , shortList . size ) ; }
Test the size of the list
 @throws Exception
Test the size of the list @throws Exception
// try getting size of an empty list: returns 0 // try getting size of a list after add at end : size should be +1