assertEquals("SERVER:tomcat", new Integer(3), joined.get(WebProjectItem.newServer("tomcat")));
assertEquals("SERVER:glassfish", new Integer(3), joined.get(WebProjectItem.newServer("glassfish")));
}
public void testWebProjectItems() {
WebProjectItem item = new WebProjectItem("SERVER:glassfish");
WebProjectItem item2 = new WebProjectItem("SERVER:glassfish");
WebProjectItem item3 = WebProjectItem.newServer("glassfish");
WebProjectItem item4 = WebProjectItem.newServer("tomcat");
assertEquals(item, item2);
assertEquals(item.hashCode(), item2.hashCode());
assertEquals(item, item3);
assertEquals(item.hashCode(), item3.hashCode());
assertEquals(WebProjectItem.Type.SERVER, item.getType());
assertNotSame(item, item4);
assertEquals("glassfish", item.getName());
item = new WebProjectItem("FRAMEWORK:Spring Framework 2.5");
assertEquals(WebProjectItem.Type.FRAMEWORK, item.getType());
assertEquals("Spring Framework 2.5", item.getName());
}