adamsaghy commented on code in PR #3350:
URL: https://github.com/apache/fineract/pull/3350#discussion_r1291283802


##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/investor/externalassetowner/SearchExternalAssetOwnerTransferTest.java:
##########
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.integrationtests.investor.externalassetowner;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import io.restassured.builder.RequestSpecBuilder;
+import io.restassured.builder.ResponseSpecBuilder;
+import io.restassured.http.ContentType;
+import io.restassured.specification.RequestSpecification;
+import io.restassured.specification.ResponseSpecification;
+import 
org.apache.fineract.client.models.GetSearchExternalAssetOwnerTransferResponse;
+import 
org.apache.fineract.client.models.PagedRequestExternalAssetOwnerSearchRequest;
+import org.apache.fineract.integrationtests.common.ExternalAssetOwnerHelper;
+import org.apache.fineract.integrationtests.common.Utils;
+import 
org.apache.fineract.integrationtests.common.loans.LoanTestLifecycleExtension;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+@ExtendWith(LoanTestLifecycleExtension.class)
+public class SearchExternalAssetOwnerTransferTest {
+
+    private static ResponseSpecification RESPONSE_SPEC;
+    private static RequestSpecification REQUEST_SPEC;
+    private static ExternalAssetOwnerHelper EXTERNAL_ASSET_OWNER_HELPER;
+
+    @BeforeAll
+    public static void setupInvestorConfig() {
+        Utils.initializeRESTAssured();
+        REQUEST_SPEC = new 
RequestSpecBuilder().setContentType(ContentType.JSON).build();
+        REQUEST_SPEC.header("Authorization", "Basic " + 
Utils.loginIntoServerAndGetBase64EncodedAuthenticationKey());
+        RESPONSE_SPEC = new 
ResponseSpecBuilder().expectStatusCode(200).build();
+        EXTERNAL_ASSET_OWNER_HELPER = new ExternalAssetOwnerHelper();
+    }
+
+    @Test
+    public void initialSearchExternalAssetOwnerTransferTest() {
+        PagedRequestExternalAssetOwnerSearchRequest searchRequest = 
EXTERNAL_ASSET_OWNER_HELPER.buildExternalAssetOwnerSearchRequest("",

Review Comment:
   Please write proper tests!
   1. Test case that covers searching by text
   1.1 Test case when there is found item
   1.2 Test case when there is no found item
   2. Test case that covers searching by submitted on from/to date
   2.1 Test case when there is found item
   2.2 Test case when there is no found item
   3. Test case that covers searching by effective from/to date
   3.1 Test case when there is found item
   3.2 Test case when there is no found item
   4. Test case that covers searching by text and submitted on from date when 
it should find item by text, but it filters out as the submitted on from date 
is not matching
   5. Test case when submitted on from date of search request date format is 
invalid



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to