From 646a7659c6663e60d4e076d93bff05c0b10d58d0 Mon Sep 17 00:00:00 2001
From: rosengeorgiev <rosen.georgiev@vereign.com>
Date: Wed, 10 May 2023 14:43:41 +0300
Subject: [PATCH] code review comments fix

---
 .../test/rest/pojo/presentationRequest/Data.java   | 12 ++++++------
 .../schemas/Proof_GET_find_proof_presentation.json |  4 ++--
 .../Proof_POST_OOB_presentation_request.json       |  4 ++--
 .../test/rest/ocm/proof/ProofStepDefinitions.java  | 12 ++++++------
 .../ocm/attestation/v1/schemas/GET.feature         |  4 ++--
 .../proof/v1/find-by-presentation-id/GET.feature   | 14 +++++++-------
 .../proof/v1/find-proof-presentation/GET.feature   |  6 +++---
 .../POST.feature                                   |  4 ++--
 8 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/main/java/api/test/rest/pojo/presentationRequest/Data.java b/src/main/java/api/test/rest/pojo/presentationRequest/Data.java
index 1615a0d..e3d1ba2 100644
--- a/src/main/java/api/test/rest/pojo/presentationRequest/Data.java
+++ b/src/main/java/api/test/rest/pojo/presentationRequest/Data.java
@@ -13,8 +13,8 @@ public class Data {
     private String mCredentialDefId;
     @SerializedName("id")
     private String mId;
-    @SerializedName("presentationId")
-    private String mPresentationId;
+    @SerializedName("proofRecordId")
+    private String mproofRecordId;
     @SerializedName("presentationMessage")
     private String mPresentationMessage;
     @SerializedName("schemaId")
@@ -58,12 +58,12 @@ public class Data {
         mId = id;
     }
 
-    public String getPresentationId() {
-        return mPresentationId;
+    public String getProofRecordId() {
+        return mproofRecordId;
     }
 
-    public void setPresentationId(String presentationId) {
-        mPresentationId = presentationId;
+    public void setProofRecordId(String proofRecordId) {
+        mproofRecordId = proofRecordId;
     }
 
     public String getPresentationMessage() {
diff --git a/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json b/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json
index fadfeb8..eb9ee7f 100644
--- a/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json
+++ b/src/main/resources/REST/schemas/Proof_GET_find_proof_presentation.json
@@ -23,7 +23,7 @@
                 "id": {
                   "type": "string"
                 },
-                "presentationId": {
+                "proofRecordId": {
                   "type": "string"
                 },
                 "connectionId": {
@@ -50,7 +50,7 @@
               },
               "required": [
                 "id",
-                "presentationId",
+                "proofRecordId",
                 "connectionId",
                 "credentialDefId",
                 "schemaId",
diff --git a/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json b/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json
index 32b549f..6828919 100644
--- a/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json
+++ b/src/main/resources/REST/schemas/Proof_POST_OOB_presentation_request.json
@@ -14,7 +14,7 @@
         "id": {
           "type": "string"
         },
-        "presentationId": {
+        "proofRecordId": {
           "type": "string"
         },
         "connectionId": {
@@ -44,7 +44,7 @@
       },
       "required": [
         "id",
-        "presentationId",
+        "proofRecordId",
         "connectionId",
         "credentialDefId",
         "schemaId",
diff --git a/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java b/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java
index bee6454..a5ee034 100644
--- a/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java
+++ b/src/test/java/api/test/rest/ocm/proof/ProofStepDefinitions.java
@@ -104,14 +104,14 @@ public class ProofStepDefinitions extends BaseStepDefinitions {
         I_get_all_proof_presentations_via_OCM_Api();
     }
 
-    @Given("^I get proof presentations with the current presentationId via OCM Api")
-    public void I_get_all_proof_presentations_with_the_current_presentationId_via_OCM_Api() {
-      I_get_proof_presentations_with_presentationId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getPresentationId());
+    @Given("^I get proof presentations with the current proofRecordId via OCM Api")
+    public void I_get_all_proof_presentations_with_the_current_proofRecordId_via_OCM_Api() {
+      I_get_proof_presentations_with_proofRecordId_via_OCM_Api(restSessionContainer.getCurrentPresentation().getData().getProofRecordId());
     }
 
-    @Given("^I get proof presentations with presentationId \\{(.*?)\\} via OCM Api")
-    public void I_get_proof_presentations_with_presentationId_via_OCM_Api(String presentationId) {
-        currentRequest.setPath("/proof/v1/find-by-presentation-id?presentationId="+ presentationId);
+    @Given("^I get proof presentations with proofRecordId \\{(.*?)\\} via OCM Api")
+    public void I_get_proof_presentations_with_proofRecordId_via_OCM_Api(String proofRecordId) {
+        currentRequest.setPath("/proof/v1/find-by-presentation-id?proofRecordId="+ proofRecordId);
 
         Response response = RestClient.get(currentRequest);
         addRequest(currentRequest);
diff --git a/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature b/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature
index aec20eb..6ff272e 100644
--- a/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature
+++ b/src/test/resources/features/ocm/attestation/v1/schemas/GET.feature
@@ -33,7 +33,7 @@ Feature: API - OCM - attestation - v1 - schemas GET
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
     And the response is valid according to the {Attestation_GET_schemas.json} REST schema
-    And the field {message} contains the value {Schemas fetch successfully}
+    And the field {message} contains the value {Schemas fetched successfully}
     And the field {$..count} is present and not empty
 
   @schemas
@@ -46,5 +46,5 @@ Feature: API - OCM - attestation - v1 - schemas GET
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
     And the response is valid according to the {Attestation_GET_schemas.json} REST schema
-    And the field {message} contains the value {Schemas fetch successfully}
+    And the field {message} contains the value {Schemas fetched successfully}
     And the field {$.data.records} contains {1} elements
\ No newline at end of file
diff --git a/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature b/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature
index 89a6c7a..6bdbfef 100644
--- a/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature
+++ b/src/test/resources/features/ocm/proof/v1/find-by-presentation-id/GET.feature
@@ -13,7 +13,7 @@
 #You should have received a copy of the GNU Affero General Public License
 #along with this program. If not, see <http://www.gnu.org/licenses/>.
 
-#http://localhost/ocm/proof/v1/find-by-presentation-id?presentationId={{presentation-id}}
+#http://localhost/ocm/proof/v1/find-by-presentation-id?proofRecordId={{proofRecordId}}
 #Author: Rosen Georgiev rosen.georgiev@vereign.com
 
 #NOTE: Cannot be fully tested, because it needs connection to be made with PCM.
@@ -29,14 +29,14 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET
     Given we are testing the OCM Api
 
   @presentation @negative
-  Scenario: OCM - Proof - Get proof presentation with presentationId - Positive
-    Given I get proof presentations with presentationId {nonExistentId} via OCM Api
+  Scenario: OCM - Proof - Get proof presentation with proofRecordId - Positive
+    Given I get proof presentations with proofRecordId {nonExistentId} via OCM Api
     Then the field {statusCode} contains the value {404}
     And the status code should be {404}
     Then the field {message} contains the value {proof with proofRecordId "nonExistentId" not found.}
 
   @proof @bug-proof-25 @bug-proof-24
-  Scenario: OCM - Proof - Get OOB presentation request via presentationId - Positive
+  Scenario: OCM - Proof - Get OOB presentation request via proofRecordId - Positive
   #Create a new member process connection
     Given an administrator generates a QR code by creating a connection with alias {member} via OCM api
     Then the field {statusCode} contains the value {200}
@@ -58,10 +58,10 @@ Feature: API - OCM - proof - v1 - find-by-presentation-id GET
     Then I send out of bound presentation request with the current data via OCM Api
     And the status code should be {201}
     Then the field {statusCode} contains the value {201}
-  #Get the request via presentationid
+  #Get the request via proofRecordId
     And I clear the request body
-    Given I get proof presentations with the current presentationId via OCM Api
+    Given I get proof presentations with the current proofRecordId via OCM Api
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
-    Then the field {message} contains the value {Proof presentation fetch successfully}
+    Then the field {message} contains the value {Proof presentation fetched successfully}
     Then the field {$.data.state} contains the value {request-sent}
\ No newline at end of file
diff --git a/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature b/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature
index bdf488e..e07384c 100644
--- a/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature
+++ b/src/test/resources/features/ocm/proof/v1/find-proof-presentation/GET.feature
@@ -29,7 +29,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
     Given I get all proof presentations via OCM Api
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
-    Then the field {message} contains the value {Proof presentation fetch successfully}
+    Then the field {message} contains the value {Proof presentations fetched successfully}
     And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
 
   @proof
@@ -37,7 +37,7 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
     Given I get all proof presentations with pageSize {5} and page {0} via OCM api
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
-    Then the field {message} contains the value {Proof presentation fetch successfully}
+    Then the field {message} contains the value {Proof presentations fetched successfully}
     And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
     And the field {$.data.records} contains {5} elements
 
@@ -46,6 +46,6 @@ Feature: API - OCM - proof - v1 - find-proof-presentation GET
     Given I get all proof presentations with pageSize {9999} and page {999} via OCM api
     Then the field {statusCode} contains the value {200}
     And the status code should be {200}
-    Then the field {message} contains the value {Proof presentation fetch successfully}
+    Then the field {message} contains the value {Proof presentations fetched successfully}
     And the response is valid according to the {Proof_GET_find_proof_presentation.json} REST schema
     And the field {$.data.records} contains {0} elements
\ No newline at end of file
diff --git a/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature b/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature
index b4cae43..e12ba5c 100644
--- a/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature
+++ b/src/test/resources/features/ocm/proof/v1/send-out-of-band-presentation-request/POST.feature
@@ -52,7 +52,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST
     Then I send out of bound presentation request with the current data via OCM Api
     And the status code should be {201}
     Then the field {statusCode} contains the value {201}
-    Then the field {message} contains the value {Presentation request send successfully}
+    Then the field {message} contains the value {Presentation request sent successfully}
     Then the field {$.data.credentialDefId} contains the value {}
     Then the field {$.data.status} contains the value {request-sent}
     And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema
@@ -64,7 +64,7 @@ Feature: API - OCM - proof - v1 - send-out-of-band-presentation-request POST
     Then I send out of bound presentation request via OCM Api
     And the status code should be {201}
     Then the field {statusCode} contains the value {201}
-    Then the field {message} contains the value {Presentation request send successfully}
+    Then the field {message} contains the value {Presentation request sent successfully}
     Then the field {$.data.credentialDefId} contains the value {}
     Then the field {$.data.status} contains the value {request-sent}
     And the response is valid according to the {Proof_POST_OOB_presentation_request.json} REST schema
-- 
GitLab