Skip to content

Commit

Permalink
refactor: 변경된 내용에 따른 테스트 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
david-parkk committed Nov 14, 2024
1 parent 09fbf18 commit a537d26
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public class MapWebsocketTest {
@Autowired
UserCashRepository userCashRepository;

User user1=new User("1",2.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1, Status.JUMP,1,1);
User user2=new User("2",1.1,1.1,1.1,1.1,1.1,1.1,2.2,2.2,2.2, Status.STAND,1,1);
User user1=new User("1",2.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1, Status.JUMP,1,1,1);
User user2=new User("2",1.1,1.1,1.1,1.1,1.1,1.1,2.2,2.2,2.2, Status.STAND,1,1,1);

UserResponseDto userResponseDto1=UserResponseDto.toDto(user1);
UserResponseDto userResponseDto2=UserResponseDto.toDto(user2);
Expand Down Expand Up @@ -90,7 +90,7 @@ public void test1() throws URISyntaxException {
public void test2() throws URISyntaxException {
userCashRepository.delete(user1.getUserId()).block();
userCashRepository.delete(user2.getUserId()).block();
User notUseUser = new User("2", 1.1, 1.1, 1.1, 1.1, 1.1, 1.1,1.1,1.1,1.1, Status.NOTUSE,1,1);
User notUseUser = new User("2", 1.1, 1.1, 1.1, 1.1, 1.1, 1.1,1.1,1.1,1.1, Status.NOTUSE,1,1,1);
userCashRepository.add(notUseUser).block();

int connectionTimeSecond=1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class UserControllerTest {
@Autowired
UserCashRepository userCashRepository;

User user1=new User("11",2.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1, Status.JUMP,1,1);
User user2=new User("22",1.1,1.1,1.1,1.1,1.1,1.1,2.2,2.2,2.2, Status.STAND,1,1);
User user1=new User("11",2.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1, Status.JUMP,1,1,1);
User user2=new User("22",1.1,1.1,1.1,1.1,1.1,1.1,2.2,2.2,2.2, Status.STAND,1,1,1);
GetMapUserResponse userResponse1=GetMapUserResponse.toDto(user1);

@PostConstruct
Expand Down Expand Up @@ -86,7 +86,7 @@ public void test2(){
@DisplayName("post 요청으로 db에 저장할 수 있다.")
public void test3(){
webTestClient = WebTestClient.bindToApplicationContext(applicationContext).configureClient().responseTimeout(Duration.ofHours(1)).build();
User user3=new User("3",1.234,2.345,3.4567,1.1,1.1,1.1,1.1,1.1,1.1, Status.NOTUSE,1,1);
User user3=new User("3",1.234,2.345,3.4567,1.1,1.1,1.1,1.1,1.1,1.1, Status.NOTUSE,1,1,1);
PostMapUserRequest postMapUserRequest=PostMapUserRequest.toEntity(user3);
PostMapUserResponse postMapUserResponse=PostMapUserResponse.toDto(user3);
webTestClient.post()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class UserRepositoryTest {
@Autowired
private UserRepository userRepository;

User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);


@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public class UserControllerImplAPITest {
UserService userService;


User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
PostMapUserRequest postMapUserRequest = PostMapUserRequest.toEntity(user);
PostMapUserResponse postMapUserResponse = PostMapUserResponse.toDto(user);
GetMapUserResponse getMapUserResponse = GetMapUserResponse.toDto(user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class UserControllerImplTest {
@Autowired
UserController userController;

User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
PostMapUserRequest postMapUserRequest = PostMapUserRequest.toEntity(user);
PostMapUserResponse postMapUserResponse = PostMapUserResponse.toDto(user);
GetMapUserResponse getMapUserResponse = GetMapUserResponse.toDto(user);
Expand Down Expand Up @@ -85,8 +85,8 @@ public void test2() {
public void test3() {
//given

User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1);
User user1 = new User("1", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
User user2 = new User("2", 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, 9.1, Status.STAND,1,1,1);
GetMapUserResponse getMapUserResponse1 = GetMapUserResponse.toDto(user1);
GetMapUserResponse getMapUserResponse2 = GetMapUserResponse.toDto(user2);

Expand Down

0 comments on commit a537d26

Please sign in to comment.