/** * Test to ensure the MemoryMapArchive requires a name * * @throws Exception */ @Test(expected = IllegalArgumentException.class) public void testConstructorRequiresName() throws Exception { new MemoryMapArchiveImpl(null); }
/** * Test to ensure the MemoryMapArchive requires a name * * @throws Exception */ @Test(expected = IllegalArgumentException.class) public void testConstructorRequiresExtensionLoader() throws Exception { new MemoryMapArchiveImpl("test.jar", null); }
@Override protected MemoryMapArchive createNewArchive() { return new MemoryMapArchiveImpl(ShrinkWrap.getDefaultDomain().getConfiguration()); }
/** * Test to ensure MemoryMap archives can be created with a name * * @throws Exception */ @Test public void testConstructorWithName() throws Exception { String name = "test.jar"; MemoryMapArchive tmp = new MemoryMapArchiveImpl(name, ShrinkWrap.getDefaultDomain().getConfiguration()); Assert.assertEquals("Should return the same name as construtor arg", name, tmp.getName()); }
final Archive<T> to = Archive.class.cast(new MemoryMapArchiveImpl(configuration));
final Archive<T> to = Archive.class.cast(new MemoryMapArchiveImpl(configuration));