예제 #1
0
 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
   }
 }
예제 #2
0
 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());
 }
예제 #3
0
 public void test_DartProjectImpl_getProject_notNull() {
   IProject project = new MockProject();
   DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project);
   assertEquals(project, dartProject.getProject());
 }
예제 #4
0
 public void test_DartProjectImpl_getElementName() {
   String projectName = "project";
   IProject project = new MockProject(projectName);
   DartProjectImpl dartProject = new DartProjectImpl(new DartModelImpl(), project);
   assertEquals(projectName, dartProject.getElementName());
 }