Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ buildscript {
}
repositories {
mavenCentral()
jcenter()
gradlePluginPortal()
}
dependencies {
Expand All @@ -32,12 +31,11 @@ allprojects {
version = "1.0.0-SNAPSHOT"

repositories {
maven { url "http://jcenter.bintray.com" }
maven { url "https://dl.bintray.com/palantir/releases" }
maven { url "https://repo.spring.io/libs-snapshot" }
maven { url "http://repo.spring.io/libs-milestone" }
maven { url "http://maven.wso2.org/nexus/content/repositories/releases/" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://repo.spring.io/libs-milestone" }
maven { url "https://maven.wso2.org/nexus/content/repositories/releases/" }
maven { url "https://repo.maven.apache.org/maven2" }
mavenLocal()
mavenCentral()
}
Expand Down Expand Up @@ -135,8 +133,9 @@ allprojects {
}

imports {
mavenBom "org.springframework:spring-framework-bom:5.0.7.RELEASE"
mavenBom "org.springframework.security:spring-security-bom:5.0.6.RELEASE"
// mavenBom "org.springframework:spring-framework-bom:5.0.7.RELEASE"
// mavenBom "org.springframework.security:spring-security-bom:5.0.6.RELEASE"
// mavenBom "org.springframework:spring-framework-bom:5.3.8"
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
mavenBom "com.fasterxml.jackson:jackson-bom:${jacksonVersion}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class MifosAPIServiceTest {
@Before
public void setup() {
MifosAPIService mifosAPIService = new MifosAPIService();
// MifosAPIService mifosAPIService = new MifosAPIService();
}

// Prepare a test case for parse the sample XML file
Expand Down
342 changes: 171 additions & 171 deletions client/src/test/java/org/mifos/chatbot/client/api/ClientApiApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,174 +25,174 @@
* Do not edit the class manually.
*/


package org.mifos.chatbot.client.api;

import org.mifos.chatbot.client.ApiException;
import org.mifos.chatbot.client.model.AccountSummaryCollectionData;
import org.mifos.chatbot.client.model.ClientData;
import org.mifos.chatbot.client.model.CommandProcessingResult;
import org.junit.Test;
import org.junit.Ignore;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* API tests for ClientApiApi
*/
@Ignore
public class ClientApiApiTest {

private final ClientApiApi api = new ClientApiApi();

/**
* Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer |
*
* [Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId [Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId [Reactivate a Client] Mandatory Fields : reactivationDate [UndoReject a Client] Mandatory Fields : reopenedDate [UndoWithdraw a Client]Mandatory Fields : reopenedDate
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void activateTest() throws ApiException {
Long clientId = null;
String body2 = null;
String command = null;
String body = null;
String response = api.activate(clientId, body2, command, body);

// TODO: test validations
}
/**
* Create a Client
*
* Note: 1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name). 2.If address is enable(enable-address=true), then additional field called address has to be passed.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void createTest() throws ApiException {
ClientData body = null;
CommandProcessingResult response = api.create(body);

// TODO: test validations
}
/**
* Delete a Client
*
* If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void deleteTest() throws ApiException {
Long clientId = null;
CommandProcessingResult response = api.delete(clientId);

// TODO: test validations
}
/**
* List Clients
*
* Example Requests: clients clients?fields=displayName,officeName,timeline clients?offset=10&limit=50 clients?orderBy=displayName&sortOrder=DESC
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void retrieveAllTest() throws ApiException {
String sqlSearch = null;
Long officeId = null;
String externalId = null;
String displayName = null;
String firstName = null;
String lastName = null;
String underHierarchy = null;
Integer offset = null;
Integer limit = null;
String orderBy = null;
String sortOrder = null;
Boolean orphansOnly = null;
ClientData response = api.retrieveAll(sqlSearch, officeId, externalId, displayName, firstName, lastName, underHierarchy, offset, limit, orderBy, sortOrder, orphansOnly);

// TODO: test validations
}
/**
* Retrieve client accounts overview
*
* An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application. It is quite reasonable to add resources like this to simplify User Interface development. Example Requests: clients/1/accounts clients/1/accounts?fields=loanAccounts,savingsAccounts
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void retrieveAssociatedAccountsTest() throws ApiException {
Long clientId = null;
AccountSummaryCollectionData response = api.retrieveAssociatedAccounts(clientId);

// TODO: test validations
}
/**
* Retrieve a Client
*
* Example Requests: clients/1 clients/1?template=true clients/1?fields=id,displayName,officeName
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void retrieveOneTest() throws ApiException {
Long clientId = null;
Boolean staffInSelectedOfficeOnly = null;
ClientData response = api.retrieveOne(clientId, staffInSelectedOfficeOnly);

// TODO: test validations
}
/**
* Retrieve Client Details Template
*
* This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed Value ListsExample Request: clients/template
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void retrieveTemplateTest() throws ApiException {
Long officeId = null;
String commandParam = null;
Boolean staffInSelectedOfficeOnly = null;
ClientData response = api.retrieveTemplate(officeId, commandParam, staffInSelectedOfficeOnly);

// TODO: test validations
}
/**
* Update a Client
*
* You can update any of the basic attributes of a client (but not its associations) using this API. Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same. The relationship between a client and a group must be removed through the Groups API.
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void updateTest() throws ApiException {
Long clientId = null;
ClientData body = null;
CommandProcessingResult response = api.update(clientId, body);

// TODO: test validations
}
}
//
//package org.mifos.chatbot.client.api;
//
//import org.mifos.chatbot.client.ApiException;
////import org.mifos.chatbot.client.model.AccountSummaryCollectionData;
////import org.mifos.chatbot.client.model.ClientData;
//import org.mifos.chatbot.client.model.CommandProcessingResult;
//import org.junit.Test;
//import org.junit.Ignore;
//
////import java.util.ArrayList;
////import java.util.HashMap;
////import java.util.List;
////import java.util.Map;
//
///**
// * API tests for ClientApiApi
// */
//@Ignore
//public class ClientApiApiTest {
//
// private final ClientApiApi api = new ClientApiApi();
//
//
// /**
// * Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer |
// *
// * [Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId [Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId [Reactivate a Client] Mandatory Fields : reactivationDate [UndoReject a Client] Mandatory Fields : reopenedDate [UndoWithdraw a Client]Mandatory Fields : reopenedDate
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void activateTest() throws ApiException {
// Long clientId = null;
// String body2 = null;
// String command = null;
// String body = null;
// String response = api.activate(clientId, body2, command, body);
//
// // TODO: test validations
// }
//
// /**
// * Create a Client
// *
// * Note: 1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name). 2.If address is enable(enable-address=true), then additional field called address has to be passed.
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void createTest() throws ApiException {
// ClientData body = null;
// CommandProcessingResult response = api.create(body);
//
// // TODO: test validations
// }
//
// /**
// * Delete a Client
// *
// * If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void deleteTest() throws ApiException {
// Long clientId = null;
// CommandProcessingResult response = api.delete(clientId);
//
// // TODO: test validations
// }
//
// /**
// * List Clients
// *
// * Example Requests: clients clients?fields=displayName,officeName,timeline clients?offset=10&limit=50 clients?orderBy=displayName&sortOrder=DESC
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void retrieveAllTest() throws ApiException {
// String sqlSearch = null;
// Long officeId = null;
// String externalId = null;
// String displayName = null;
// String firstName = null;
// String lastName = null;
// String underHierarchy = null;
// Integer offset = null;
// Integer limit = null;
// String orderBy = null;
// String sortOrder = null;
// Boolean orphansOnly = null;
// ClientData response = api.retrieveAll(sqlSearch, officeId, externalId, displayName, firstName, lastName, underHierarchy, offset, limit, orderBy, sortOrder, orphansOnly);
//
// // TODO: test validations
// }
//
// /**
// * Retrieve client accounts overview
// *
// * An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application. It is quite reasonable to add resources like this to simplify User Interface development. Example Requests: clients/1/accounts clients/1/accounts?fields=loanAccounts,savingsAccounts
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void retrieveAssociatedAccountsTest() throws ApiException {
// Long clientId = null;
// AccountSummaryCollectionData response = api.retrieveAssociatedAccounts(clientId);
//
// // TODO: test validations
// }
//
// /**
// * Retrieve a Client
// *
// * Example Requests: clients/1 clients/1?template=true clients/1?fields=id,displayName,officeName
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void retrieveOneTest() throws ApiException {
// Long clientId = null;
// Boolean staffInSelectedOfficeOnly = null;
// ClientData response = api.retrieveOne(clientId, staffInSelectedOfficeOnly);
//
// // TODO: test validations
// }
//
// /**
// * Retrieve Client Details Template
// *
// * This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: Field Defaults Allowed Value ListsExample Request: clients/template
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void retrieveTemplateTest() throws ApiException {
// Long officeId = null;
// String commandParam = null;
// Boolean staffInSelectedOfficeOnly = null;
// ClientData response = api.retrieveTemplate(officeId, commandParam, staffInSelectedOfficeOnly);
//
// // TODO: test validations
// }
//
// /**
// * Update a Client
// *
// * You can update any of the basic attributes of a client (but not its associations) using this API. Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same. The relationship between a client and a group must be removed through the Groups API.
// *
// * @throws ApiException
// * if the Api call fails
// */
// @Test
// public void updateTest() throws ApiException {
// Long clientId = null;
// ClientData body = null;
// CommandProcessingResult response = api.update(clientId, body);
//
// // TODO: test validations
// }
//
//}
Loading