コード例 #1
0
 public void testAllArtifacts() {
   assertNotNull(batchProject);
   Collection<IBatchArtifact> cs = batchProject.getAllArtifacts();
   assertFalse(cs.isEmpty());
   int total = cs.size();
   int total2 = 0;
   for (BatchArtifactType t : BatchArtifactType.values()) {
     cs = batchProject.getArtifacts(t);
     total2 += cs.size();
   }
   assertEquals(total, total2);
 }
コード例 #2
0
 public void testBatchJobs() {
   Set<IFile> batchJobs = batchProject.getDeclaredBatchJobs();
   assertFalse(batchJobs.isEmpty());
   for (IFile batchJob : batchJobs) {
     assertTrue(batchJob.exists());
   }
 }
コード例 #3
0
 Collection<IBatchArtifact> assertArtifactsByType(BatchArtifactType type) {
   Collection<IBatchArtifact> cs = batchProject.getArtifacts(type);
   assertFalse(cs.isEmpty());
   for (IBatchArtifact a : cs) {
     assertTrue(a.getArtifactType() == type);
   }
   return cs;
 }
コード例 #4
0
  IBatchArtifact assertArtifactByNameAndType(
      String name, BatchArtifactType type, boolean checkNamedDeclaration) {
    Collection<IBatchArtifact> cs = batchProject.getArtifacts(name);
    assertEquals(1, cs.size());

    IBatchArtifact b = cs.iterator().next();
    if (checkNamedDeclaration) {
      assertNotNull(b.getNamedDeclaration());
    }
    assertEquals(name, b.getName());
    assertTrue(b.getArtifactType() == type);
    return b;
  }
コード例 #5
0
 public void testTypeReferences() {
   String typeName = "java.lang.ArrayIndexOutOfBoundsException";
   IType type = ((BatchProject) batchProject).getType(typeName);
   assertNotNull(type);
   assertTextSourceReferences(batchProject.getReferences(type), typeName);
 }