use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class VnfcCustomizationRepositoryTest method createAndGetTest.
@Test
@Transactional
public void createAndGetTest() throws Exception {
VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
vnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
vnfcCustomizationRepository.save(vnfcCustomization);
VnfcCustomization foundVnfcCustomization = vnfcCustomizationRepository.findById("cf9f6efc-9f14-11e8-98d0-529269fb1459").orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
assertThat(vnfcCustomization, sameBeanAs(foundVnfcCustomization).ignoring("created"));
}
use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class PnfCustomizationRepositoryTest method findById_ValidUuid_ExpectedOutput.
@Test
public void findById_ValidUuid_ExpectedOutput() throws Exception {
PnfResourceCustomization pnfResourceCustomization = pnfCustomizationRepository.findById("68dc9a92-214c-11e7-93ae-92361f002680").orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
checkPnfResourceCustomization(pnfResourceCustomization);
}
use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class CloudSiteRepositoryTest method findOneTest.
@Test
public void findOneTest() throws Exception {
CloudSite cloudSite = cloudSiteRepository.findById("mtn13").orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
Assert.assertNotNull(cloudSite);
Assert.assertEquals("mtn13", cloudSite.getId());
}
use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class VnfcInstanceGroupCustomizationRepositoryTest method findAllTest.
@Test
public void findAllTest() throws Exception {
List<VnfcInstanceGroupCustomization> vnfcInstanceGroupCustomizationList = vnfcInstanceGroupCustomizationRepository.findAll();
Assert.assertFalse(CollectionUtils.isEmpty(vnfcInstanceGroupCustomizationList));
VnfcInstanceGroupCustomization vnfcInstanceGroupCustomization = vnfcInstanceGroupCustomizationRepository.findById(1450).orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
Assert.assertTrue(vnfcInstanceGroupCustomization.getFunction().equalsIgnoreCase("FUNCTION"));
}
use of org.onap.so.db.catalog.exceptions.NoEntityFoundException in project so by onap.
the class CloudifyManagerRepositoryTest method findOneTest.
@Test
public void findOneTest() throws Exception {
CloudifyManager cloudifyManager = cloudifyManagerRepository.findById("mtn13").orElseThrow(() -> new NoEntityFoundException("Cannot Find Operation"));
Assert.assertNotNull(cloudifyManager);
Assert.assertEquals("mtn13", cloudifyManager.getId());
}
Aggregations