From f89d9e0887e41de727b4e829916ae60dd6926e0e Mon Sep 17 00:00:00 2001 From: "Boslet, Cory" Date: Thu, 21 Nov 2019 20:48:40 -0500 Subject: Updated and added to get request processing data Updated and added to get request processing data by internal data flag Committing file that I forgot to commit. Added junit test and change method to not use bowman client. Added and updated orch request unit test ran formatter so verify job will pass and not cry Added an intergration test for new jpa method. Format unit test class for the verify job build Update param key in jpa and also changed return type. Updated method name in request client to avoid confusion Issue-ID: SO-2534 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I420f1a887835dd0d9d0ad991e5b17dddb1db5376 --- .../RequestProcessingDataRequestDbQueryTest.java | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'adapters/mso-requests-db-adapter/src/test/java') diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java index abc70ed6bf..9641cb8004 100644 --- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java +++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestdb/rest/RequestProcessingDataRequestDbQueryTest.java @@ -7,9 +7,9 @@ * 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. @@ -86,4 +86,28 @@ public class RequestProcessingDataRequestDbQueryTest { assertEquals(dataFound.get(1).getValue(), secondEntry.getValue()); assertEquals(dataFound.get(1).getTag(), secondEntry.getTag()); } + + @Test + @Transactional + public void testGetRequestProcessingDataBySoRequestIdAndIsInternalData() { + String soRequestId = "00032ab7-na18-42e5-965d-8ea592502018"; + String tag = "pincFabricConfigRequest"; + RequestProcessingData firstEntry = new RequestProcessingData(); + List expectedList = new ArrayList<>(); + firstEntry.setSoRequestId(soRequestId); + firstEntry.setGroupingId("7d2e8c07-4d10-456d-bddc-37abf38ca715"); + firstEntry.setName("configurationId"); + firstEntry.setValue("52234bc0-d6a6-41d4-a901-79015e4877e2"); + firstEntry.setTag(tag); + expectedList.add(firstEntry); + + List dataFound = client.getExternalRequestProcessingDataBySoRequestId(soRequestId); + + assertEquals(1, dataFound.size()); + assertEquals(dataFound.get(0).getSoRequestId(), firstEntry.getSoRequestId()); + assertEquals(dataFound.get(0).getGroupingId(), firstEntry.getGroupingId()); + assertEquals(dataFound.get(0).getName(), firstEntry.getName()); + assertEquals(dataFound.get(0).getValue(), firstEntry.getValue()); + assertEquals(dataFound.get(0).getTag(), firstEntry.getTag()); + } } -- cgit 1.2.3-korg