package com.capgemini.framework.common;

import junit.framework.Assert;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.text.ParseException;
import java.util.Calendar;


@Slf4j
public class TeamcenterDateFormatterTest {

    /**
     * JUNIT TEST.
     * 
     * @throws ParseException should not happen
     */
    @Test
    public void testFormatCalendarToFrench() throws ParseException {
        log.info("testCalendarWithTimeZoneFR ....");
        Calendar date = Calendar.getInstance();
        date.set(2015, 1, 2); // Feb 4th, 2015
        String dateFr = TeamcenterDateFormatter.formatCalendarToFrench(date);
        log.info("Date FR : " + dateFr);

        log.info("With date to compare : " + date);
        Assert.assertEquals("WRONG FORMAT DATE EXPECTED [DD MMMM YYYY], LOCALE FR", "02 février 2015", dateFr);
    }
}
