Esempio n. 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"));
  }
Esempio n. 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"));
  }
Esempio n. 3
0
 @Test
 public void testAddJarForClass() {
   jobRequest.addJarForClass(String.class);
   assertEquals(1, jobRequest.getJars().size());
   assertTrue(jobRequest.getJars().contains(ClassUtils.jarForClass(String.class)));
 }