public void testSetLineNum()  {
		boolean thrown=false;

		//Legal Lines.
		LineNumber c = new LineNumber();
		try {
			c.setLineNumber("3.2.1");
		} catch (IllegalLineException e1) {
			thrown = true;
		}
		assertEquals("3.2.1", c.toString());
		assertFalse(thrown);
		try {
			c.setLineNumber("2.1");
		} catch (IllegalLineException e1) {
			thrown = true;
		}
		assertEquals("2.1", c.toString());
		assertFalse(thrown);
		try {
			c.setLineNumber("6.11");
		} catch (IllegalLineException e1) {
			thrown = true;
		}
		assertEquals("6.11", c.toString());
		assertFalse(thrown);

		//Illegal Lines. 
		thrown = false;
		try { //Unacceptable character.
			c.setLineNumber("~");
		} catch (IllegalLineException e) {
			assertEquals(e.getMessage(),"Line reference can only be numbers and periods.");
			thrown = true;
		}
		assertTrue(thrown);

		try {//Invalid letters.
			c.setLineNumber("hello"); 
		} catch (IllegalLineException e) {
			assertEquals(e.getMessage(),"Line reference can only be numbers and periods.");
			thrown = true;
		}
		assertTrue(thrown);

		try { //Multiple periods.
			c.setLineNumber("3..1");
		} catch (IllegalLineException e) {
			assertEquals(e.getMessage(),"Extra period.");			
			thrown = true;
		}
		assertTrue(thrown);

		try {//Extra ending period.
			c.setLineNumber("3.1.");
		} catch (IllegalLineException e) {
			assertEquals(e.getMessage(),"No ending periods.");			
			thrown = true;
		}
		assertTrue(thrown);
	}