/*
 * 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.mobile.controller.user;

import com.arrebol.apc.model.core.User;
import java.util.List;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;

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

    /**
     * Avatar 2
     */
    public final static String USER_MOBILE_AVATAR_2_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364";
    public final static String TEPIC_OFFICE = "caef3a64-7d1f-11ea-af3e-28f659da398e";

    private UserController controller;

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

    //@Test
    public void isUserEnebled() {
        try {
            assertTrue(controller.isUserEnebled(USER_MOBILE_AVATAR_2_ID));
        } catch (Exception e) {
            assertFalse(true);
        }
    }

    //@Test
    public void containtsUserManagementProperty() {
        try {
            assertTrue(controller.containtsUserManagementProperty(USER_MOBILE_AVATAR_2_ID));
        } catch (Exception e) {
            assertFalse(true);
        }
    }

    @Test
    public void listOfUsersByOffice() {
        try {
            List<User> results = controller.listOfUsersByOffice(TEPIC_OFFICE);

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

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