-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BE] 테스트 코드 리팩토링 #730
Open
woosung1223
wants to merge
12
commits into
develop
Choose a base branch
from
be/feature/729-test-refactor
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[BE] 테스트 코드 리팩토링 #730
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bc56f07
refactor: 인수 테스트 복구
woosung1223 c209ebd
chore: 불필요한 코드 제거, 스타일 조정
woosung1223 1fa27ea
chore: 불필요한 어노테이션 삭제
woosung1223 3a2aca5
refactor: `@AutoConfigureMockMvc`를 사용하고 있으므로 `setUp` 메소드 삭제
woosung1223 9c296bc
chore: `GenerationStrategy`를 `IntegrationTest`로 이동, 불필요한 의존성 제거
woosung1223 4b08854
refactor: 인증 관련 메소드를 상위 클래스에 두지 않고 `AuthIntegrationTest`로 이동
woosung1223 431ad83
chore: `@Disabled` 처리된 테스트 복구
woosung1223 81f6419
chore: 메소드명 변경, 모든 테스트가 `TestEntityManager`가 아닌 `EntityManager`를 사용하도…
woosung1223 13bb5a6
chore: unused import 제거
woosung1223 bc6e3bf
chore: softly 선언이 되고 있지 않던 문제 해결
woosung1223 2a90fdf
chore: 매직 넘버 제거
woosung1223 5d0cb9a
chore: 인수 테스트 로그인 순서 복구
woosung1223 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
import org.springframework.transaction.annotation.Transactional; | ||
import org.springframework.web.context.WebApplicationContext; | ||
|
||
|
||
@DisplayNameGeneration(ReplaceUnderscores.class) | ||
@AutoConfigureMockMvc | ||
@Transactional | ||
|
@@ -44,6 +45,7 @@ class IntegrationTest { | |
@Autowired | ||
protected ObjectMapper objectMapper; | ||
|
||
@Autowired | ||
protected MockMvc mockMvc; | ||
|
||
@Autowired | ||
|
@@ -58,14 +60,6 @@ class IntegrationTest { | |
@MockBean | ||
private OauthClients oauthClients; | ||
|
||
void setUp() { | ||
this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build(); | ||
} | ||
|
||
protected void setMockMvc() { | ||
this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build(); | ||
} | ||
|
||
Comment on lines
-62
to
-69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 꼼꼼한 리팩토링 👍 |
||
public LoginResponse 구글_로그인(String name) throws Exception { | ||
OauthLoginRequest request = new OauthLoginRequest("google", "oauthLoginCode"); | ||
String jsonRequest = objectMapper.writeValueAsString(request); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
섬세하군요👍