Code example for DecimalFormatSymbols

Methods: setDecimalSeparator, setGroupingSeparator

0
 
    @Ignore 
    public void testNumberOfDaysPreviousMonth() { 
        int numberOfDays = Utils.numberOfDaysPreviousMonth();
        Assert.assertTrue(numberOfDays == 30);
    } 
 
    @Test 
    public void testParseGetal() throws ParseException { 
        String getal = "1.234";
        int integer = Utils.parseGetal(getal);
        Assert.assertEquals(1234, integer);
    } 
 
    @Test 
    public void testGetLastDayOfPreviousPeriodSameMonth() { 
        int startDayOfPeriod = 21;
        Calendar cal = Calendar.getInstance();
        cal.set(2012, Calendar.OCTOBER, 25);
        Date lastDayOfPreviousPeriod = Utils.getLastDayOfPreviousPeriod(startDayOfPeriod, cal);