import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.izouma.awesomeadmin.service.UserInfoService;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.GenericXmlContextLoader;
import org.springframework.transaction.annotation.Transactional;

@RunWith(value = SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:/spring/applicationContext.xml"}, loader = GenericXmlContextLoader.class)
@Transactional
public class UserServiceTest {
    @Autowired
    private UserInfoService userInfoService;

    @Test
    public void testFindDepartLeader() {
        System.out.println(userInfoService.findDepartLeader("84666"));
    }

    @Test
    public void testFindUserByRoleName() {
        System.out.println(userInfoService.findUserByRoleName("hr"));
    }
}
