Skip to content

Commit

Permalink
Refactor test 코드 주석 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
seongjunnoh committed Jul 14, 2024
1 parent 5ca0594 commit 9a84c24
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/test/java/space/space_spring/service/UserServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,30 @@
@SpringBootTest
class UserServiceTest {

@Autowired
UserService userService;

@Autowired
UserDao userDao;

@Transactional
@Rollback(value = false)
@Test
@DisplayName("유저_회원가입_테스트")
void 유저_회원가입_테스트() throws Exception {
//given
String email = "[email protected]";
String password = "123456abC!";
String name = "노성준";
PostUserSignupRequest postUserRequest = new PostUserSignupRequest(email, password, name);

//when
PostUserSignupResponse postUserResponse = userService.signup(postUserRequest);
User findUser = userDao.findUserByEmail(email);

//then
Assertions.assertThat(postUserResponse.getUserId()).isEqualTo(findUser.getUserId());
}
// @Autowired
// UserService userService;
//
// @Autowired
// UserDao userDao;
//
// @Transactional
// @Rollback(value = false)
// @Test
// @DisplayName("유저_회원가입_테스트")
// void 유저_회원가입_테스트() throws Exception {
// //given
// String email = "[email protected]";
// String password = "123456abC!";
// String name = "노성준";
// PostUserSignupRequest postUserRequest = new PostUserSignupRequest(email, password, name);
//
// //when
// PostUserSignupResponse postUserResponse = userService.signup(postUserRequest);
// User findUser = userDao.findUserByEmail(email);
//
// //then
// Assertions.assertThat(postUserResponse.getUserId()).isEqualTo(findUser.getUserId());
// }

// @Transactional
// @Test
Expand Down

0 comments on commit 9a84c24

Please sign in to comment.