package com.fusi24.entryPermitScanner;

import com.fusi24.entryPermitScanner.util.DateHelper;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class DateHelperUnitTest {
    @Test
    public void convertDateToReadableDateTest() {
        String dateFromServer = "2020-05-31T15:04:10+00:00"; // Using ISO 8601 formatted date
        String convertDate = DateHelper.convertDateToReadableDate(dateFromServer); // change to dd-MMM-yyyy
        assertEquals("This test created in 31 May 2020", "31-May-2020", convertDate);
    }
}