public class ClientDeployableTest extends TestCase {
private ClassLoader classLoader;
public void testLoadClient() throws Exception {
URL resource = classLoader.getResource("deployables/app-client1.jar");
ClientDeployable deployable = new ClientDeployable(resource);
assertEquals(ModuleType.CAR, deployable.getType());
Set entrySet = new HashSet(Collections.list(deployable.entries()));
Set resultSet = new HashSet();
resultSet.add("META-INF/");
resultSet.add("META-INF/MANIFEST.MF");
resultSet.add("META-INF/application-client.xml");
resultSet.add("Main.java");
resultSet.add("Main.class");
assertEquals(resultSet, entrySet);
InputStream entry = deployable.getEntry("META-INF/application-client.xml");
assertNotNull(entry);
entry.close();
Class main = deployable.getClassFromScope("Main");
assertEquals("Main", main.getName());
DDBeanRoot root = deployable.getDDBeanRoot();
assertNotNull(root);
assertEquals(ModuleType.CAR, root.getType());
assertEquals(deployable, root.getDeployableObject());
}