/*
 * 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.apc.controller.admin;

import com.arrebol.apc.model.enums.PeopleType;
import com.arrebol.apc.model.views.AdministrationPersonSerchView;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

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

    private AdministrationPersonSearchViewController controller;
    private final String person_search = "%mari%";
    private final String id_office = "caef3a64-7d1f-11ea-af3e-28f659da398e";
    private List<String> routes;

    @Before
    public void init() {
        controller = new AdministrationPersonSearchViewController();
        routes = new ArrayList<>();

        routes.add("51b207a2-8e19-11ea-b65e-4e1376171215");
        routes.add("5a329e3c-8e19-11ea-b65e-4e1376171215");
        routes.add("55baf3ae-8e19-11ea-b65e-4e1376171215");
    }

    @Test
    public void existStableSmallBoxByCreatedOn() {
        List<AdministrationPersonSerchView> results = controller.likePersonNameInPersonTypeInRoutesAndOffice(person_search, PeopleType.ENDORSEMENT, routes, id_office);

        results.forEach(System.out::println);

        Assert.assertTrue(!results.isEmpty());
    }
}
