use of org.nhindirect.config.store.dao.impl.CertPolicyDaoImpl in project nhin-d by DirectProject.
the class CertPolicyDaoImpl_getPolicyGroupsTest method testGetPolicyGroups_noEntityManager_assertException.
@Test
public void testGetPolicyGroups_noEntityManager_assertException() {
final CertPolicyDaoImpl dao = new CertPolicyDaoImpl();
boolean exceptionOccured = false;
try {
dao.getPolicyGroups();
} catch (IllegalStateException ex) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.config.store.dao.impl.CertPolicyDaoImpl in project nhin-d by DirectProject.
the class CertPolicyDaoImpl_removePolicyUseFromGroupTest method testRemovePolicyFromGroup_noEntityManager_assertException.
@Test
public void testRemovePolicyFromGroup_noEntityManager_assertException() {
final CertPolicyDaoImpl certDao = new CertPolicyDaoImpl();
boolean exceptionOccured = false;
try {
certDao.removePolicyUseFromGroup(1234);
} catch (IllegalStateException ex) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.config.store.dao.impl.CertPolicyDaoImpl in project nhin-d by DirectProject.
the class CertPolicyDaoImpl_updateGroupAttributesTest method ttestUpdateGroupAttributes_noEntityManager_assertException.
@Test
public void ttestUpdateGroupAttributes_noEntityManager_assertException() throws Exception {
final CertPolicyDaoImpl dao = new CertPolicyDaoImpl();
boolean exceptionOccured = false;
try {
dao.updateGroupAttributes(12345, "");
} catch (IllegalStateException ex) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.config.store.dao.impl.CertPolicyDaoImpl in project nhin-d by DirectProject.
the class CertPolicyDaoImpl_updateGroupAttributesTest method testUpdateGroupAttributes_exceptionInQuery_assertException.
@Test
public void testUpdateGroupAttributes_exceptionInQuery_assertException() throws Exception {
final EntityManager manager = mock(EntityManager.class);
doThrow(new RuntimeException("Just Passing Through")).when(manager).createQuery((String) any());
final CertPolicyDaoImpl dao = new CertPolicyDaoImpl();
dao.setEntityManager(manager);
boolean exceptionOccured = false;
try {
dao.updateGroupAttributes(12345, "");
} catch (ConfigurationStoreException ex) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
use of org.nhindirect.config.store.dao.impl.CertPolicyDaoImpl in project nhin-d by DirectProject.
the class CertPolicyDaoImpl_getPoliciesTest method testGetPolices_noEntityManager_assertException.
@Test
public void testGetPolices_noEntityManager_assertException() {
final CertPolicyDaoImpl dao = new CertPolicyDaoImpl();
boolean exceptionOccured = false;
try {
dao.getPolicies();
} catch (IllegalStateException ex) {
exceptionOccured = true;
}
assertTrue(exceptionOccured);
}
Aggregations