use of org.onap.so.serviceinstancebeans.ModelInfo in project so by onap.
the class RequestHandlerUtilsUnitTest method getIsBaseVfModuleModelVersionIdNullTest.
@Test
public void getIsBaseVfModuleModelVersionIdNullTest() throws ApiException {
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelInvariantId(MODEL_INVARIANT_ID);
modelInfo.setModelVersion(MODEL_VERSION);
modelInfo.setModelName(MODEL_NAME);
Boolean expected = false;
doReturn(null).when(catDbClient).getVfModuleByModelInvariantUUIDAndModelVersion(MODEL_INVARIANT_ID, MODEL_VERSION);
Boolean result = requestHandler.getIsBaseVfModule(modelInfo, Action.deleteInstance, vnfType, sdcServiceModelVersion, currentActiveRequest);
assertEquals(result, expected);
}
use of org.onap.so.serviceinstancebeans.ModelInfo in project so by onap.
the class RequestHandlerUtilsUnitTest method getModelTypeTest.
@Test
public void getModelTypeTest() throws ApiException {
ModelType modelTypeExpected = ModelType.service;
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelType(ModelType.service);
ModelType modelTypeResult = requestHandler.getModelType(Action.createInstance, modelInfo);
assertEquals(modelTypeResult, modelTypeExpected);
}
use of org.onap.so.serviceinstancebeans.ModelInfo in project so by onap.
the class RequestHandlerUtilsUnitTest method getIsBaseVfModuleTrueTest.
@Test
public void getIsBaseVfModuleTrueTest() throws ApiException {
VfModule vfModule = new VfModule();
vfModule.setIsBase(true);
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelVersionId(MODEL_VERSION_ID);
doReturn(vfModule).when(catDbClient).getVfModuleByModelUUID(MODEL_VERSION_ID);
Boolean expected = true;
Boolean result = requestHandler.getIsBaseVfModule(modelInfo, action, vnfType, sdcServiceModelVersion, currentActiveRequest);
assertEquals(result, expected);
}
use of org.onap.so.serviceinstancebeans.ModelInfo in project so by onap.
the class RequestHandlerUtilsUnitTest method getIsBaseVfModuleModelVersionNullTest.
@Test
public void getIsBaseVfModuleModelVersionNullTest() throws ApiException {
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelInvariantId(MODEL_INVARIANT_ID);
modelInfo.setModelName(MODEL_NAME);
Boolean expected = false;
Boolean result = requestHandler.getIsBaseVfModule(modelInfo, Action.deleteInstance, vnfType, sdcServiceModelVersion, currentActiveRequest);
assertEquals(result, expected);
}
Aggregations