Skip to content
Permalink
Browse files
Merge pull request #4 from myrle-krantz/develop
Updating package names.
  • Loading branch information
myrle-krantz committed Apr 16, 2018
2 parents 3040b58 + ec68fff commit 3e65a07143672b4fae87e2f2ee875809bbf8ed05
Showing 76 changed files with 519 additions and 548 deletions.
@@ -1,7 +1,5 @@
# Apache Fineract CN Teller

[![Join the chat at https://gitter.im/mifos-initiative/mifos.io](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mifos-initiative/mifos.io?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This project provides management and operational functionality for teller operation.

## Versioning
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1;
package org.apache.fineract.cn.teller.api.v1;

@SuppressWarnings("unused")
public interface EventConstants {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1;
package org.apache.fineract.cn.teller.api.v1;

@SuppressWarnings("unused")
public interface PermittableGroupIds {
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;
package org.apache.fineract.cn.teller.api.v1.client;

public class TellerAlreadyExistsException extends RuntimeException {
}
@@ -16,18 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;

import io.mifos.core.api.annotation.ThrowsException;
import io.mifos.core.api.annotation.ThrowsExceptions;
import io.mifos.core.api.util.CustomFeignClientsConfiguration;
import io.mifos.teller.api.v1.domain.Teller;
import io.mifos.teller.api.v1.domain.TellerBalanceSheet;
import io.mifos.teller.api.v1.domain.TellerDenomination;
import io.mifos.teller.api.v1.domain.TellerManagementCommand;
import io.mifos.teller.api.v1.domain.TellerTransaction;
import io.mifos.teller.api.v1.domain.TellerTransactionCosts;
import io.mifos.teller.api.v1.domain.UnlockDrawerCommand;
package org.apache.fineract.cn.teller.api.v1.client;

import org.apache.fineract.cn.teller.api.v1.domain.Teller;
import org.apache.fineract.cn.teller.api.v1.domain.TellerBalanceSheet;
import org.apache.fineract.cn.teller.api.v1.domain.TellerDenomination;
import org.apache.fineract.cn.teller.api.v1.domain.TellerManagementCommand;
import org.apache.fineract.cn.teller.api.v1.domain.TellerTransaction;
import org.apache.fineract.cn.teller.api.v1.domain.TellerTransactionCosts;
import org.apache.fineract.cn.teller.api.v1.domain.UnlockDrawerCommand;
import java.util.List;
import javax.validation.Valid;
import org.apache.fineract.cn.api.annotation.ThrowsException;
import org.apache.fineract.cn.api.annotation.ThrowsExceptions;
import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
@@ -37,9 +39,6 @@
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;
import java.util.List;

@FeignClient(value = "teller-v1", path = "/teller/v1", configuration = CustomFeignClientsConfiguration.class)
public interface TellerManager {

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;
package org.apache.fineract.cn.teller.api.v1.client;

public class TellerNotFoundException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;
package org.apache.fineract.cn.teller.api.v1.client;

public class TellerTransactionValidationException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;
package org.apache.fineract.cn.teller.api.v1.client;

public class TellerValidationException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.client;
package org.apache.fineract.cn.teller.api.v1.client;

public class TransactionProcessingException extends RuntimeException {
}
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import org.hibernate.validator.constraints.NotEmpty;

@@ -16,9 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;

public class MICR {
@ValidIdentifier(maxLength = 8)
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
import org.hibernate.validator.constraints.NotEmpty;
package org.apache.fineract.cn.teller.api.v1.domain;

import java.math.BigDecimal;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
import org.hibernate.validator.constraints.NotEmpty;

public class Teller {

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
@@ -16,13 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;
import org.hibernate.validator.constraints.Range;

public class TellerDenomination {

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
@@ -16,14 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
package org.apache.fineract.cn.teller.api.v1.domain;

import java.math.BigDecimal;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;

public class TellerManagementCommand {

@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
package org.apache.fineract.cn.teller.api.v1.domain;

import java.math.BigDecimal;
import javax.validation.Valid;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import org.apache.fineract.cn.lang.validation.constraints.ValidIdentifier;

public class TellerTransaction {

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller.api.v1.domain;
package org.apache.fineract.cn.teller.api.v1.domain;

public class UnlockDrawerCommand {

@@ -16,21 +16,22 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller;

import io.mifos.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
import io.mifos.core.api.context.AutoUserContext;
import io.mifos.core.lang.ApplicationName;
import io.mifos.core.test.fixture.TenantDataStoreContextTestRule;
import io.mifos.core.test.listener.EnableEventRecording;
import io.mifos.core.test.listener.EventRecorder;
import io.mifos.teller.api.v1.EventConstants;
import io.mifos.teller.api.v1.client.TellerManager;
import io.mifos.teller.service.internal.service.helper.AccountingService;
import io.mifos.teller.service.internal.service.helper.ChequeService;
import io.mifos.teller.service.internal.service.helper.DepositAccountManagementService;
import io.mifos.teller.service.internal.service.helper.OrganizationService;
import io.mifos.teller.service.internal.service.helper.PortfolioService;
package org.apache.fineract.cn.teller;

import org.apache.fineract.cn.teller.api.v1.EventConstants;
import org.apache.fineract.cn.teller.api.v1.client.TellerManager;
import org.apache.fineract.cn.teller.service.internal.service.helper.AccountingService;
import org.apache.fineract.cn.teller.service.internal.service.helper.ChequeService;
import org.apache.fineract.cn.teller.service.internal.service.helper.DepositAccountManagementService;
import org.apache.fineract.cn.teller.service.internal.service.helper.OrganizationService;
import org.apache.fineract.cn.teller.service.internal.service.helper.PortfolioService;
import java.security.interfaces.RSAPrivateKey;
import org.apache.fineract.cn.anubis.test.v1.TenantApplicationSecurityEnvironmentTestRule;
import org.apache.fineract.cn.api.context.AutoUserContext;
import org.apache.fineract.cn.lang.ApplicationName;
import org.apache.fineract.cn.test.fixture.TenantDataStoreContextTestRule;
import org.apache.fineract.cn.test.listener.EnableEventRecording;
import org.apache.fineract.cn.test.listener.EventRecorder;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
@@ -50,8 +51,6 @@
import org.springframework.context.annotation.Import;
import org.springframework.test.context.junit4.SpringRunner;

import java.security.interfaces.RSAPrivateKey;

@RunWith(SpringRunner.class)
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT,
@@ -63,10 +62,10 @@ public class AbstractTellerTest extends SuiteTestEnvironment {

@Configuration
@EnableEventRecording
@EnableFeignClients(basePackages = {"io.mifos.teller.api.v1.client"})
@EnableFeignClients(basePackages = {"org.apache.fineract.cn.teller.api.v1.client"})
@RibbonClient(name = APP_NAME)
@Import({TellerConfiguration.class})
@ComponentScan("io.mifos.teller.listener")
@ComponentScan("org.apache.fineract.cn.teller.listener")
public static class TestConfiguration {
public TestConfiguration() {
super();
@@ -16,11 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller;
package org.apache.fineract.cn.teller;

import io.mifos.core.test.env.TestEnvironment;
import io.mifos.core.test.fixture.cassandra.CassandraInitializer;
import io.mifos.core.test.fixture.mariadb.MariaDBInitializer;
import org.apache.fineract.cn.test.env.TestEnvironment;
import org.apache.fineract.cn.test.fixture.cassandra.CassandraInitializer;
import org.apache.fineract.cn.test.fixture.mariadb.MariaDBInitializer;
import org.junit.ClassRule;
import org.junit.rules.RuleChain;
import org.junit.rules.RunExternalResourceOnce;
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller;
package org.apache.fineract.cn.teller;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -16,34 +16,33 @@
* specific language governing permissions and limitations
* under the License.
*/
package io.mifos.teller;
package org.apache.fineract.cn.teller;

import com.google.common.collect.Lists;
import io.mifos.accounting.api.v1.domain.Account;
import io.mifos.accounting.api.v1.domain.AccountEntry;
import io.mifos.accounting.api.v1.domain.AccountEntryPage;
import io.mifos.core.lang.DateConverter;
import io.mifos.teller.api.v1.EventConstants;
import io.mifos.teller.api.v1.domain.Cheque;
import io.mifos.teller.api.v1.domain.MICR;
import io.mifos.teller.api.v1.domain.Teller;
import io.mifos.teller.api.v1.domain.TellerBalanceSheet;
import io.mifos.teller.api.v1.domain.TellerManagementCommand;
import io.mifos.teller.api.v1.domain.TellerTransaction;
import io.mifos.teller.api.v1.domain.TellerTransactionCosts;
import io.mifos.teller.api.v1.domain.UnlockDrawerCommand;
import io.mifos.teller.util.TellerGenerator;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;

import org.apache.fineract.cn.teller.api.v1.EventConstants;
import org.apache.fineract.cn.teller.api.v1.domain.Cheque;
import org.apache.fineract.cn.teller.api.v1.domain.MICR;
import org.apache.fineract.cn.teller.api.v1.domain.Teller;
import org.apache.fineract.cn.teller.api.v1.domain.TellerBalanceSheet;
import org.apache.fineract.cn.teller.api.v1.domain.TellerManagementCommand;
import org.apache.fineract.cn.teller.api.v1.domain.TellerTransaction;
import org.apache.fineract.cn.teller.api.v1.domain.TellerTransactionCosts;
import org.apache.fineract.cn.teller.api.v1.domain.UnlockDrawerCommand;
import org.apache.fineract.cn.teller.util.TellerGenerator;
import java.math.BigDecimal;
import java.time.Clock;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Optional;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.fineract.cn.accounting.api.v1.domain.Account;
import org.apache.fineract.cn.accounting.api.v1.domain.AccountEntry;
import org.apache.fineract.cn.accounting.api.v1.domain.AccountEntryPage;
import org.apache.fineract.cn.lang.DateConverter;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;

public class TestTellerBalance extends AbstractTellerTest {

0 comments on commit 3e65a07

Please sign in to comment.