use of com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl in project core-util by WSO2Telco.
the class KeyValueBasedPcrDAOImplTest method testcheckIsRelated.
@Test
public void testcheckIsRelated() throws PCRException {
KeyValueBasedPcrDAOImpl keyValueBasedPcrDAOImpl = new KeyValueBasedPcrDAOImpl();
assertTrue(keyValueBasedPcrDAOImpl.checkIsRelated("s1", "a1"));
}
use of com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl in project core-util by WSO2Telco.
the class KeyValueBasedPcrDAOImplTest method testgetExistingPCR.
@Test
public void testgetExistingPCR() throws PCRException {
KeyValueBasedPcrDAOImpl keyValueBasedPcrDAOImpl = new KeyValueBasedPcrDAOImpl();
RequestDTO requestDTO = new RequestDTO("u1", "a1", "s1");
assertEquals(keyValueBasedPcrDAOImpl.getExistingPCR(requestDTO), "p1");
}
use of com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl in project core-util by WSO2Telco.
the class KeyValueBasedPcrDAOImplTest method testgetAppIdListForUserSectorCombination.
@Test
public void testgetAppIdListForUserSectorCombination() throws PCRException {
KeyValueBasedPcrDAOImpl keyValueBasedPcrDAOImpl = new KeyValueBasedPcrDAOImpl();
List<String> list = keyValueBasedPcrDAOImpl.getAppIdListForUserSectorCombination("u2", "s2");
// assertNull(list);
assertTrue(list.isEmpty());
// assertEquals(list.get(0),"a1");
// assertEquals(list.get(1), "a2");
}
use of com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl in project core-util by WSO2Telco.
the class KeyValueBasedPcrDAOImplTest method testcheckApplicationExists.
@Test
public void testcheckApplicationExists() throws PCRException {
KeyValueBasedPcrDAOImpl keyValueBasedPcrDAOImpl = new KeyValueBasedPcrDAOImpl();
assertTrue(keyValueBasedPcrDAOImpl.checkApplicationExists("s1", "a1"));
}
use of com.wso2telco.core.pcrservice.dao.impl.KeyValueBasedPcrDAOImpl in project core-util by WSO2Telco.
the class UUIDPCRService method createAndPersistNewPcr.
private void createAndPersistNewPcr(RequestDTO requestDTO, String pcr) throws PCRException {
KeyValueBasedPcrDAOImpl keyValueBasedPcrDAO = new KeyValueBasedPcrDAOImpl();
keyValueBasedPcrDAO.createNewPcrEntry(requestDTO, pcr);
}
Aggregations