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