Examples of AmountConfigs


Examples of za.co.javajoe.confiurations.AmountConfigs

            //Load a properties file from class path, inside static method
            prop.load(input);

            //Assigning a preloaded Config Object
            amountConfigs = new AmountConfigs( prop);

        } catch (IOException ex) {
            ex.printStackTrace();
        } finally{
            if(input!=null){
View Full Code Here

Examples of za.co.javajoe.confiurations.AmountConfigs

     * @param transactionAmount amount that the client is using for transaction.
     * @return boolean
     */
    public static boolean amountIsWithinRange( BigDecimal transactionAmount) {

        AmountConfigs amountConfigs = ConfigUtil.getAmountConfigs();

        Validate.notNull( amountConfigs, "Error, Configurations are NULL");
        Validate.notNull( amountConfigs.getMinimumAmount(), "Error, Config (Min Amount) is NULL");
        Validate.notNull( amountConfigs.getMaximumAmount(), "Error, Config (Max Amount) is NULL");

        if ( !amountMoreThanMinimum( transactionAmount, amountConfigs.getMinimumAmount()) ||
                !amountLessThanMaximum( transactionAmount, amountConfigs.getMaximumAmount())) {
            return false;
        }

        return true;
    }
View Full Code Here

Examples of za.co.javajoe.confiurations.AmountConfigs

    @Test
    public void testLoadConfigurations() throws Exception {

        assertNotNull("Your Configurations (Object) is NULL", ConfigUtil.getAmountConfigs());
        AmountConfigs amountConfigs = ConfigUtil.getAmountConfigs();

        assertNotNull( "Min Amount (Config) Is NULL", amountConfigs.getMinimumAmount());
        assertNotNull( "Max Amount (Config) Is NULL", amountConfigs.getMaximumAmount());

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.