/*
 * Arrebol Consultancy copyright.
 * 
 * This code belongs to Arrebol Consultancy
 * its use, redistribution or modification are prohibited 
 * without written authorization from Arrebol Consultancy.
 */
package com.arrebol.taxiservicios.controller.admin;

import com.arrebol.taxiservicios.model.core.User;
import java.util.Calendar;
import java.util.Date;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
 */
public class GenericValidationControllerTest {

    private Date startDate;
    private GenericValidationController controller;
    private User user;
    private final String userID = "09ea84b8-b9d1-4a71-adfe-db653b2a9982";

    public GenericValidationControllerTest() {
    }

    @Before
    public void setUp() {
        controller = new GenericValidationController();

        Calendar start = Calendar.getInstance();

        //2021-06-17 13:32:46
        start.set(2021, 5, 17, 9, 7, 4);

        startDate = start.getTime();
        user = new User(userID, "");
    }

    @Test
    public void existClosingDayByCreatedOn() {
        Assert.assertTrue(controller.existClosingDayByCreatedOn(startDate, user));
    }
}
