use of org.apache.karaf.features.internal.service.RepositoryImpl in project ddf by codice.
the class ApplicationImplTest method testGetURI.
/**
* Tests the {@link ApplicationImpl#getURI()} method
*
* @throws Exception
*/
@Test
public void testGetURI() throws Exception {
URI testURI = getClass().getClassLoader().getResource(FILE_MAIN_FEATURE).toURI();
RepositoryImpl repo1 = new RepositoryImpl(testURI);
repo1.load();
Application testApp1 = new ApplicationImpl(repo1);
assertEquals(testURI, testApp1.getURI());
}
use of org.apache.karaf.features.internal.service.RepositoryImpl in project ddf by codice.
the class ApplicationNodeImplTest method testHashCode.
/**
* Tests the {@link ApplicationNodeImpl#hashCode()} method
*/
@Test
public void testHashCode() {
try {
Repository testRepo = new RepositoryImpl(ApplicationNodeImpl.class.getClassLoader().getResource(FEATURES_FILE_NAME).toURI());
Application testApp = new ApplicationImpl(testRepo);
ApplicationNode testNode = new ApplicationNodeImpl(testApp);
assertEquals(testApp.hashCode(), testNode.hashCode());
} catch (Exception e) {
LOGGER.info("Exception: ", e);
fail();
}
}
Aggregations