package com.nokia.service; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import com.nokia.pojo.User; @SpringBootTest public class UserServiceTest { @Autowired private UserService userService; @Test void testAdd() { User userEntity = new User(); userEntity.setLoginName("lizh231"); userEntity.setUserName("李志辉"); } @Test void testDelete() { } @Test void testGetByLoginName() { User user = userService.getByLoginName("test_abc"); System.out.println(user); } @Test void testAddRole() { // User user = userService.getByLoginName("test_123"); // Role role = roleService.getByRoleName("工单处理(建设处理)"); } @Test void testSelect() { } @Test void testUpdate() { } }