package com.jboss.jbds.installer.bean;

import junit.framework.TestCase;

public class ServerTypeTest extends TestCase {

	public void testGetTypeString() {
		assertEquals(ServerType.getType(ServerType.AS.getName()),ServerType.AS);
		assertEquals(ServerType.getType(ServerType.SOAP.getName()),ServerType.SOAP);
		assertEquals(ServerType.getType(ServerType.SOAP_STD.getName()),ServerType.SOAP_STD);
		assertEquals(ServerType.getType(ServerType.EAP.getName()),ServerType.EAP);
		try {
			ServerType.getType("test");
		} catch(IllegalArgumentException ex) {
			assertTrue(ex instanceof IllegalArgumentException);
			return;
		}
		fail("IllegalArgumentException was not thrown for illigal server type");
	}

}
