- @Test(expectedExceptions = AsdcCatalogException.class)
- void whenCantFindModelInSdc_thenExceptionIsThrown() throws AsdcCatalogException {
+ @Test(dataProvider="vfModuleModelInfos")
+ void isVfModuleBaseModule_vfModuleIsMatchedByEitherNameOrUuid(boolean isBaseInTosca, ModelInfo instanceModelInfo, boolean expected) {
+ GroupProperties mockedGroupProperties = mock(GroupProperties.class);
+ when(mockedGroupProperties.getBaseModule()).thenReturn(isBaseInTosca);
+
+ VfModule toscaVfModuleModelInfo = mock(VfModule.class);
+ when(toscaVfModuleModelInfo.getCustomizationUuid()).thenReturn("toscaCustomizationUuid");
+ when(toscaVfModuleModelInfo.getModelCustomizationName()).thenReturn("toscaCustomizationName");
+ when(toscaVfModuleModelInfo.getProperties()).thenReturn(mockedGroupProperties);
+
+
+ ServiceModel mockedServiceModel = mock(ServiceModel.class);
+ when(mockedServiceModel.getVfModules()).thenReturn(singletonMap("some-name", toscaVfModuleModelInfo));
+