* ============LICENSE_START=======================================================
* VID
* ================================================================================
- * Modifications Copyright 2018 Nokia
+ * Modifications Copyright 2018 - 2019 Nokia
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import org.onap.vid.asdc.AsdcCatalogException;
import org.onap.vid.asdc.beans.SecureServices;
import org.onap.vid.asdc.beans.Service;
-import org.onap.vid.asdc.beans.ServiceBuilder;
import org.onap.vid.model.*;
import org.onap.vid.model.PombaInstance.PombaRequest;
import org.onap.vid.model.PombaInstance.ServiceInstance;
@Test
public void verifyServiceInstance_shouldReturnOk() throws Exception {
- PombaRequest pombaRequest = new PombaRequest();
- pombaRequest.serviceInstanceList = ImmutableList.of(new ServiceInstance());
+ PombaRequest pombaRequest = new PombaRequest(ImmutableList.of(new ServiceInstance()));
mockMvc.perform(post(REST_MODELS_SERVICES_VERIFY_SERVICE)
.contentType(MediaType.APPLICATION_JSON)
}
private Service createService(String uuid, int i) {
- return new ServiceBuilder().setUuid(uuid).setInvariantUUID("invariantUUID" + i)
+ return new Service.ServiceBuilder().setUuid(uuid).setInvariantUUID("invariantUUID" + i)
.setCategory("category" + i).setVersion("version" + i).setName("name" + i)
.setDistributionStatus("distStatus" + i).setToscaModelURL("toscaModelUrl" + i).build();
}
private ServiceModel createServiceModel(int i) {
ServiceModel model = new ServiceModel();
- model.setCollectionResource(ImmutableMap.of("resKey" + i, new CR()));
+ model.setCollectionResources(ImmutableMap.of("resKey" + i, new CR()));
model.setNetworks(ImmutableMap.of("network" + i, new Network()));
model.setPnfs(ImmutableMap.of("pnf" + i, new Node()));
model.setServiceProxies(ImmutableMap.of("servProxy" + i, new ServiceProxy()));
return IntStream.range(0, pseudoServiceModels.size()).boxed()
.collect(toMap(i -> uuids.get(i), i -> pseudoServiceModels.get(i)));
}
-}
\ No newline at end of file
+}