Ejemplo n.º 1
0
 protected ClassModel findClass(String name) {
   try {
     assertFalse(parentProject.findClass(name) == null);
   } catch (DoesNotExistException ex) {
     Logger.getLogger(BaseTest.class.getName()).log(Level.SEVERE, null, ex);
   }
   // if this failed, you probably misspelled the class-name
   return null;
 }
 private boolean isValidReference(final int startIndex, final int endIndex) {
   if (this.source().isEmpty()) return false;
   if (startIndex >= endIndex) return false;
   if (endIndex == 0) return false;
   if (endIndex - startIndex <= 1) return false;
   String source = this.source().substring(startIndex, endIndex).trim();
   if (source.isEmpty()) return false;
   if (ProjectModel.getReservedWords().containsKey(source)) {
     this.parseStatementModifier(source);
     if (ClassModel.getPrimitive(source) != null)
       this.objectType = ClassModel.getPrimitive(source);
     return false;
   }
   return true;
 }
Ejemplo n.º 3
0
 protected void setUpProjectAndPackage() throws Exception {
   parentProject = main.addProject(new ProjectModel("parent project"));
   main.setSelectedProejct(parentProject);
   parentPackage = parentProject.addPackage(new PackageModel("Parent Package"));
 }