-
Notifications
You must be signed in to change notification settings - Fork 76
/
AbstractArtifactFactoryTest.java
38 lines (30 loc) · 1.13 KB
/
AbstractArtifactFactoryTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package org.jberet.creation;
import org.junit.Before;
import org.junit.Test;
public class AbstractArtifactFactoryTest {
private AbstractArtifactFactory factory = new AbstractArtifactFactory() {
@Override
public Object create(String ref, Class<?> cls, ClassLoader classLoader) throws Exception {
return null;
}
@Override
public Class<?> getArtifactClass(String ref, ClassLoader classLoader) {
return null;
}
};
private Class noPackageBatchletClass;
private Object noPackageBatchlet;
@Before
public void setup() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
noPackageBatchletClass = Class.forName("NoPackageBatchlet");
noPackageBatchlet = noPackageBatchletClass.newInstance();
}
@Test
public void testDestroyShouldNotFailForDefaultPackage() {
factory.destroy(noPackageBatchlet);
}
@Test
public void testDoInjectionShouldNotFailForDefaultPackage() throws Exception {
factory.doInjection(noPackageBatchlet, noPackageBatchletClass, null, null, null, null);
}
}