Skip to content

Commit

Permalink
refactor: 코드 포맷팅 (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdkdhoho committed Oct 31, 2024
1 parent e7e9b38 commit a6b5dec
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.listywave.collection.application.domain;

import static com.listywave.common.exception.ErrorCode.INVALID_ACCESS;
import static lombok.AccessLevel.PROTECTED;

import com.listywave.common.BaseEntity;
import com.listywave.common.exception.CustomException;
import jakarta.persistence.Column;
Expand All @@ -10,9 +13,6 @@
import lombok.Getter;
import lombok.NoArgsConstructor;

import static com.listywave.common.exception.ErrorCode.INVALID_ACCESS;
import static lombok.AccessLevel.PROTECTED;

@Entity
@Getter
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.listywave.collection.application.domain;

import static com.listywave.common.exception.ErrorCode.LENGTH_EXCEEDED_EXCEPTION;

import com.listywave.common.exception.CustomException;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
Expand All @@ -8,8 +10,6 @@
import lombok.Getter;
import lombok.NoArgsConstructor;

import static com.listywave.common.exception.ErrorCode.LENGTH_EXCEEDED_EXCEPTION;

@Getter
@Embeddable
@EqualsAndHashCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public record FindFolderResponse(
List<FolderResponse> folders
) {

public static FindFolderResponse of(List<FolderResponse> list){
public static FindFolderResponse of(List<FolderResponse> list) {
return new FindFolderResponse(list);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.listywave.collection.presentation.dto;

public record FolderCreateRequest(
String folderName
String folderName
) {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.listywave.collection.presentation.dto;

public record FolderUpdateRequest(
String folderName
String folderName
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import com.listywave.collection.application.domain.Folder;
import com.listywave.collection.repository.custom.CustomCollectionRepository;
import com.listywave.list.application.domain.list.ListEntity;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;

public interface CollectionRepository extends JpaRepository<Collect, Long>, CustomCollectionRepository {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.listywave.collection.repository.custom;

import com.listywave.collection.application.dto.FolderResponse;

import java.util.List;

public interface CustomFolderRepository {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.listywave.collection.repository.custom.impl;

import static com.listywave.collection.application.domain.QCollect.*;
import static com.listywave.collection.application.domain.QFolder.*;
import static com.querydsl.jpa.JPAExpressions.*;
import static com.listywave.collection.application.domain.QCollect.collect;
import static com.listywave.collection.application.domain.QFolder.folder;
import static com.querydsl.jpa.JPAExpressions.select;

import com.listywave.collection.application.dto.FolderResponse;
import com.listywave.collection.repository.custom.CustomFolderRepository;
Expand All @@ -11,8 +11,8 @@
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.core.types.dsl.NumberPath;
import com.querydsl.jpa.impl.JPAQueryFactory;
import lombok.RequiredArgsConstructor;
import java.util.List;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class CustomFolderRepositoryImpl implements CustomFolderRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import com.listywave.list.application.domain.item.Item;
import com.listywave.list.application.domain.list.ListEntity;
import lombok.Builder;

import java.util.List;
import lombok.Builder;

@Builder
public record RecommendedListResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class NoticeContent {

@Column(nullable = true, length = 1000)
private String description;

@Column(nullable = true, length = 2048)
private String imageUrl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.listywave.acceptance.collection;

import static com.listywave.acceptance.common.CommonAcceptanceHelper.given;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;

import com.listywave.collection.presentation.dto.FolderSelectionRequest;
import io.restassured.response.ExtractableResponse;
import io.restassured.response.Response;

import static com.listywave.acceptance.common.CommonAcceptanceHelper.given;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;

public abstract class CollectionAcceptanceTestHelper {

public static ExtractableResponse<Response> 콜렉트_또는_콜렉트취소_API_호출(String accessToken, Long listId, FolderSelectionRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public DatabaseCleaner(JdbcTemplate jdbcTemplate) {
SELECT Concat('TRUNCATE TABLE ', TABLE_NAME, ';') AS query
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'PUBLIC'
""", String.class
""", String.class
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
package com.listywave.acceptance.folder;

import com.listywave.acceptance.common.AcceptanceTest;
import com.listywave.collection.application.dto.FindFolderResponse;
import com.listywave.collection.application.dto.FolderCreateResponse;
import com.listywave.list.application.dto.response.ListCreateResponse;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

import java.util.List;

import static com.listywave.acceptance.collection.CollectionAcceptanceTestHelper.콜렉트_또는_콜렉트취소_API_호출;
import static com.listywave.acceptance.common.CommonAcceptanceHelper.HTTP_상태_코드를_검증한다;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.*;
import static com.listywave.acceptance.list.ListAcceptanceTestHelper.*;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_삭제_API_호출;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_생성_API_호출;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_생성_요청_데이터;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_선택_요청_데이터;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_수정_API_호출;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_수정_요청_데이터;
import static com.listywave.acceptance.folder.FolderAcceptanceTestHelper.폴더_조회_API_호출;
import static com.listywave.acceptance.list.ListAcceptanceTestHelper.가장_좋아하는_견종_TOP3_생성_요청_데이터;
import static com.listywave.acceptance.list.ListAcceptanceTestHelper.리스트_저장_API_호출;
import static com.listywave.acceptance.list.ListAcceptanceTestHelper.회원용_리스트_상세_조회_API_호출;
import static com.listywave.list.fixture.ListFixture.지정된_개수만큼_리스트를_생성한다;
import static com.listywave.user.fixture.UserFixture.동호;
import static com.listywave.user.fixture.UserFixture.정수;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.springframework.http.HttpStatus.*;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.NO_CONTENT;

import com.listywave.acceptance.common.AcceptanceTest;
import com.listywave.collection.application.dto.FindFolderResponse;
import com.listywave.collection.application.dto.FolderCreateResponse;
import com.listywave.list.application.dto.response.ListCreateResponse;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

@DisplayName("폴더 관련 인수테스트")
public class FolderAcceptanceTest extends AcceptanceTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.listywave.acceptance.folder;

import static com.listywave.acceptance.common.CommonAcceptanceHelper.given;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;

import com.listywave.collection.presentation.dto.FolderCreateRequest;
import com.listywave.collection.presentation.dto.FolderSelectionRequest;
import com.listywave.collection.presentation.dto.FolderUpdateRequest;
import io.restassured.response.ExtractableResponse;
import io.restassured.response.Response;

import static com.listywave.acceptance.common.CommonAcceptanceHelper.given;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;

public abstract class FolderAcceptanceTestHelper {

public static ExtractableResponse<Response> 폴더_생성_API_호출(String accessToken, FolderCreateRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import static com.listywave.common.exception.ErrorCode.LENGTH_EXCEEDED_EXCEPTION;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertThrows;

import com.listywave.common.exception.CustomException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

@DisplayName("FolderName은 ")
class FolderNameTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package com.listywave.collection.application.domain;

import com.listywave.common.exception.CustomException;
import com.listywave.user.application.domain.User;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import static com.listywave.common.exception.ErrorCode.INVALID_ACCESS;
import static com.listywave.user.fixture.UserFixture.동호;
import static com.listywave.user.fixture.UserFixture.정수;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatNoException;
import static org.junit.jupiter.api.Assertions.assertThrows;

import com.listywave.common.exception.CustomException;
import com.listywave.user.application.domain.User;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

@DisplayName("Folder는 ")
class FolderTest {

Expand Down

0 comments on commit a6b5dec

Please sign in to comment.