/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.arrebol.taxiservicios.controller.stocktaking;

import com.arrebol.taxiservicios.model.enums.StopNotificationType;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.Before;

/**
 *
 * @author Picasso
 */
public class ServiceOrderSingletonControllerTest {

    private static final String USER_NAME_DIRECCION = "09ea84b8-b9d1-4a71-adfe-db653b2a9982";
    private static final String USER_NAME_TALLER = "53ec3b21-da17-4b95-a5e7-b77f095b43b4";
    private static final String USER_NAME_SUB_DIRECCION = "210c4b12-2550-4020-b88d-2ccf08a9c5dc";
    private static final String USER_NAME_ADMIN = "722314a5-78f3-11e9-85b3-022f6a7c1cb8";

    private ServiceOrderSingletonController controller;
    private List<String> permissionLst;
    private List<String> usrIdLst;

    public ServiceOrderSingletonControllerTest() {
    }

    @Before
    public void setUp() throws Exception {
        controller = ServiceOrderSingletonController.getInstance();
        permissionLst = new ArrayList<>();

        permissionLst.add("stocktaking.service.order.management.update");
        permissionLst.add("stocktaking.service.order.management.delete");
    }

    //@Test
    public void findAllUsersByPermissionHowWillReciveNotification() {
        try {
            usrIdLst = controller.findAllUsersByPermissionHowWillReciveNotification(USER_NAME_TALLER, permissionLst, StopNotificationType.SERVICE_ORDER);

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

            assertFalse(usrIdLst.isEmpty());
        } catch (Exception e) {
            assertFalse(true);
        }
    }

}
