import org.onap.vid.aai.util.AAITreeConverter;
import org.onap.vid.aai.util.CacheProvider;
import org.onap.vid.aai.util.TestWithAaiClient;
+import org.onap.vid.model.ModelUtil;
import org.onap.vid.model.aaiTree.Network;
import org.onap.vid.model.aaiTree.VpnBinding;
import org.onap.vid.testUtils.TestUtils;
+import org.onap.vid.utils.Logging;
import org.springframework.http.HttpMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
private AAIRestInterface aaiRestInterface;
private AaiServiceImpl aaiServiceWithoutMocks;
+ private Logging logging = new Logging();
private AaiServiceImpl createAaiServiceWithoutMocks(AAIRestInterface aaiRestInterface, CacheProvider cacheProvider) {
AaiClient aaiClient = new AaiClient(aaiRestInterface, null, cacheProvider);
ExecutorService executorService = MoreExecutors.newDirectExecutorService();
AAIServiceTree aaiServiceTree = new AAIServiceTree(
- aaiClient,
- new AAITreeNodeBuilder(aaiClient),
- new AAITreeConverter(),
- null,
- null,
- executorService
+ new AAITreeNodeBuilder(aaiClient, logging),
+ new AAITreeNodesEnricher(aaiClient, null, null, null),
+ new AAITreeConverter(new ModelUtil()), null,
+ executorService
);
- return new AaiServiceImpl(aaiClient, null, aaiServiceTree, executorService);
+ return new AaiServiceImpl(aaiClient, null, aaiServiceTree, executorService, logging);
}
@BeforeMethod
aaiServiceWithoutMocks.getVpnListByVpnType("aaa");
}
+ @Test
public void getNetworkListTest_successResponse() {
String rawResponse = TestUtils.readFileAsString("/responses/aai/l3-networks-by-cloud-region-and-tenantId.json");
final ResponseWithRequestInfo responseWithRequestInfo = mockedResponseWithRequestInfo(Response.Status.OK,