use of org.opennms.core.xml.MarshallingResourceFailureException in project opennms by OpenNMS.
the class JdbcDataCollectionConfigDaoJaxbTest method testAfterPropertiesSetWithBogusFileResource.
public void testAfterPropertiesSetWithBogusFileResource() throws Exception {
Resource resource = new FileSystemResource("/bogus-file");
JdbcDataCollectionConfigDaoJaxb dao = new JdbcDataCollectionConfigDaoJaxb();
dao.setConfigResource(resource);
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new MarshallingResourceFailureException(ThrowableAnticipator.IGNORE_MESSAGE));
try {
dao.afterPropertiesSet();
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.core.xml.MarshallingResourceFailureException in project opennms by OpenNMS.
the class XmlDataCollectionConfigDaoJaxbTest method testAfterPropertiesSetWithBogusFileResource.
/**
* Test after properties set with bogus file resource.
*
* @throws Exception the exception
*/
@Test
public void testAfterPropertiesSetWithBogusFileResource() throws Exception {
Resource resource = new FileSystemResource("/bogus-file");
XmlDataCollectionConfigDaoJaxb dao = new XmlDataCollectionConfigDaoJaxb();
dao.setConfigResource(resource);
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new MarshallingResourceFailureException(ThrowableAnticipator.IGNORE_MESSAGE));
try {
dao.afterPropertiesSet();
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.core.xml.MarshallingResourceFailureException in project opennms by OpenNMS.
the class AbstractJaxbConfigDaoTest method testAfterPropertiesSetWithBogusFileResource.
public void testAfterPropertiesSetWithBogusFileResource() throws Exception {
Resource resource = new FileSystemResource("/bogus-file");
TestJaxbConfigDao dao = new TestJaxbConfigDao();
dao.setConfigResource(resource);
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new MarshallingResourceFailureException(ThrowableAnticipator.IGNORE_MESSAGE));
try {
dao.afterPropertiesSet();
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
use of org.opennms.core.xml.MarshallingResourceFailureException in project opennms by OpenNMS.
the class AccessPointMonitorConfigDaoJaxbTest method testAfterPropertiesSetWithBogusFileResource.
public void testAfterPropertiesSetWithBogusFileResource() throws Exception {
Resource resource = new FileSystemResource("/bogus-file");
AccessPointMonitorConfigDaoJaxb dao = new AccessPointMonitorConfigDaoJaxb();
dao.setConfigResource(resource);
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new MarshallingResourceFailureException(ThrowableAnticipator.IGNORE_MESSAGE));
try {
dao.afterPropertiesSet();
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
Aggregations