package com.nokia.dao;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import com.nokia.pojo.UserRoleCity;

@SpringBootTest
public class UserRoleCityDaoTest {

    @Autowired
    private UserRoleCityDao userRoleCityDao;

    @Test
    void testHasRoleCity() {
        Integer result = userRoleCityDao.hasRoleCity(4, 16, 130200);
        System.out.println(result);
    }

    @Test
    void test() {
        UserRoleCity userRoleCity = new UserRoleCity();
        // test_abc
        userRoleCity.setUserId(4);
        // 投诉分析
        userRoleCity.setRoleId(16);
        // 唐山
        userRoleCity.setCityId(130200);
        userRoleCityDao.insert(userRoleCity);
    }

    @Test
    void test2() {
        UserRoleCity userRoleCity = new UserRoleCity();
        // test_abc
        userRoleCity.setUserId(4);
        // 投诉分析
        userRoleCity.setRoleId(18);
        // 唐山
        userRoleCity.setCityId(130200);
        userRoleCityDao.insert(userRoleCity);
    }

}
