Skip to content

Commit

Permalink
🎨 refactor: 불필요한 테스트 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
woosung1223 committed Aug 18, 2024
1 parent 4e3438c commit 1e30a73
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 137 deletions.
25 changes: 11 additions & 14 deletions src/main/java/slvtwn/khu/toyouserver/common/SessionUserService.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package slvtwn.khu.toyouserver.common;

import org.springframework.stereotype.Service;
import slvtwn.khu.toyouserver.application.UserService;
import slvtwn.khu.toyouserver.domain.SessionUser;
import slvtwn.khu.toyouserver.domain.User;
import slvtwn.khu.toyouserver.exception.ToyouException;
Expand All @@ -11,19 +10,17 @@
@Service
public class SessionUserService {

private final SessionUserRepository sessionUserRepository;
private final SessionUserRepository sessionUserRepository;
private final UserRepository userRepository;

private final UserRepository userRepository;
public SessionUserService(SessionUserRepository sessionUserRepository, UserRepository userRepository) {
this.sessionUserRepository = sessionUserRepository;
this.userRepository = userRepository;
}

public SessionUserService(SessionUserRepository sessionUserRepository, UserRepository userRepository,
UserService userService) {
this.sessionUserRepository = sessionUserRepository;
this.userRepository = userRepository;
}

public User findUserBySessionId(String sessionId) {
SessionUser bySessionId = sessionUserRepository.findBySessionId(sessionId);
return userRepository.findById(bySessionId.getUserId())
.orElseThrow(() -> new ToyouException(ErrorType.USER_NOT_FOUND));
}
public User findUserBySessionId(String sessionId) {
SessionUser bySessionId = sessionUserRepository.findBySessionId(sessionId);
return userRepository.findById(bySessionId.getUserId())
.orElseThrow(() -> new ToyouException(ErrorType.USER_NOT_FOUND));
}
}

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions src/test/java/slvtwn/khu/toyouserver/response/ResponseService.java

This file was deleted.

This file was deleted.

0 comments on commit 1e30a73

Please sign in to comment.