예제 #1
0
  @Test
  public void testAddJar() {
    jobRequest.addJar("A");
    jobRequest.addJar("B");
    jobRequest.addJar("A");

    assertEquals(2, jobRequest.getJars().size());
    assertTrue(jobRequest.getJars().contains("A"));
    assertTrue(jobRequest.getJars().contains("B"));
  }
예제 #2
0
  @Test
  public void testAddJars() {
    Set<String> set = new HashSet<String>();
    set.addAll(Arrays.asList("A", "B"));
    jobRequest.addJars(set);
    set = new HashSet<String>();
    set.addAll(Arrays.asList("B", "C"));
    jobRequest.addJars(set);

    assertEquals(3, jobRequest.getJars().size());
    assertTrue(jobRequest.getJars().contains("A"));
    assertTrue(jobRequest.getJars().contains("A"));
    assertTrue(jobRequest.getJars().contains("C"));
  }
예제 #3
0
 @Test
 public void testAddJarForClass() {
   jobRequest.addJarForClass(String.class);
   assertEquals(1, jobRequest.getJars().size());
   assertTrue(jobRequest.getJars().contains(ClassUtils.jarForClass(String.class)));
 }