public void test_newProjectDescription() throws Exception { MockWorkspaceRoot root = new MockWorkspaceRoot(); IProjectDescription description = IProjectUtilities.newDartProjectDescription(root, "foo", null); assertNotNull(description); assertEquals("foo", description.getName()); assertNull(description.getLocation()); }
@SuppressWarnings("deprecation") public void test_newProjectDescription_outsideWorkspace() throws Exception { MockWorkspaceRoot root = new MockWorkspaceRoot(); IPath loc = new Path("/some/other/place"); IProjectDescription description = IProjectUtilities.newDartProjectDescription(root, "foo", loc); assertNotNull(description); assertEquals("foo", description.getName()); assertFalse(root.getLocation().isPrefixOf(description.getLocation())); }