use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class PnfResourceRepositoryTest method findResourceById_validUuid_expectedOutput.
@Test
public void findResourceById_validUuid_expectedOutput() throws Exception {
PnfResource pnfResource = pnfResourceRepository.findById("ff2ae348-214a-11e7-93ae-92361f002680").orElseThrow(() -> new NoEntityFoundException("Cannot Find Entity"));
checkPnfResource(pnfResource);
}
use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class VnfcCustomizationRepositoryTest method findAllTest.
@Test
@Transactional
public void findAllTest() throws Exception {
List<VnfcCustomization> vnfcCustomizationList = vnfcCustomizationRepository.findAll();
Assert.assertFalse(CollectionUtils.isEmpty(vnfcCustomizationList));
VnfcCustomization vnfcCustomization = vnfcCustomizationRepository.findById("9bcce658-9b37-11e8-98d0-529269fb1459").orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
Assert.assertTrue(vnfcCustomization.getDescription().equalsIgnoreCase("testVnfcCustomizationDescription"));
}
Aggregations