public void test_DartProjectImpl_getNonDartResources() { IProject project = new MockProject(); DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project); try { dartProject.getNonDartResources(); fail("Expected DartModelException"); } catch (DartModelException exception) { // Expected } }
public void test_DartProjectImpl_getCorrespondingResource() throws DartModelException { IProject project = new MockProject("testProject") { @Override public boolean hasNature(String nature) { return nature.equals(DartCore.DART_PROJECT_NATURE); } }; DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project); assertEquals(project, dartProject.getCorrespondingResource()); }
public void test_DartProjectImpl_getProject_notNull() { IProject project = new MockProject(); DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project); assertEquals(project, dartProject.getProject()); }
public void test_DartProjectImpl_getElementName() { String projectName = "project"; IProject project = new MockProject(projectName); DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project); assertEquals(projectName, dartProject.getElementName()); }