/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.arrebol.taxiservicios.java.number.format;

import java.text.NumberFormat;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Picasso
 */
public class NumberFormatTest {

    public NumberFormatTest() {
    }

    @Before
    public void setUp() {
    }

    @Test
    public void currencyFormat() {
        String currency = null;
        try {
            //BigDecimal number = new BigDecimal("12345678.90");
            Double number = new Double("85627849.291");
            NumberFormat defaultFormat = NumberFormat.getCurrencyInstance();

            currency = defaultFormat.format(number);
            System.out.println("Currency: " + currency);

            assertNotNull(currency);
        } catch (NumberFormatException e) {
            assertNotNull(currency);
        }
    }

}
