Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 18, 2023
1 parent 83191db commit c0036ca
Showing 1 changed file with 47 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
package com.twtw.backend.domain.plan.controller;

import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest;
import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.willDoNothing;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import com.twtw.backend.domain.group.dto.response.GroupInfoResponse;
import com.twtw.backend.domain.member.dto.response.MemberResponse;
import com.twtw.backend.domain.place.entity.CategoryGroupCode;
Expand All @@ -12,6 +24,7 @@
import com.twtw.backend.domain.plan.dto.response.PlanResponse;
import com.twtw.backend.domain.plan.service.PlanService;
import com.twtw.backend.support.docs.RestDocsTest;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
Expand All @@ -22,17 +35,6 @@
import java.util.List;
import java.util.UUID;

import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest;
import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.willDoNothing;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@DisplayName("PlanController의")
@WebMvcTest(PlanController.class)
class PlanControllerTest extends RestDocsTest {
Expand Down Expand Up @@ -245,32 +247,40 @@ void outPlan() throws Exception {
@DisplayName("계획 전체 조회 API가 수행되는가")
void getPlans() throws Exception {
// given
final List<PlanInfoResponse> expected = List.of(new PlanInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
UUID.randomUUID(),
new PlaceDetails(
"카페 온마이마인드",
"https://place.map.kakao.com/1625295668",
"경기 안성시 죽산면 죽산초교길 36-4",
127.420430538256,
37.0766874564297),
new GroupInfoResponse(
UUID.randomUUID(), UUID.randomUUID(), "홍담진", "http://someUrlToS3"),
List.of(new MemberResponse(UUID.randomUUID(), "진호정"))),
new PlanInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
UUID.randomUUID(),
new PlaceDetails(
"카페 온유어마인드",
"https://place.map.kakao.com/1625295669",
"경기 안성시 죽산면 죽산초교길 36-5",
127.420430538257,
37.0766874564298),
new GroupInfoResponse(
UUID.randomUUID(), UUID.randomUUID(), "HongDamJin", "http://someUrlToS3"),
List.of(new MemberResponse(UUID.randomUUID(), "JinHoJeong"))));
final List<PlanInfoResponse> expected =
List.of(
new PlanInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
UUID.randomUUID(),
new PlaceDetails(
"카페 온마이마인드",
"https://place.map.kakao.com/1625295668",
"경기 안성시 죽산면 죽산초교길 36-4",
127.420430538256,
37.0766874564297),
new GroupInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
"홍담진",
"http://someUrlToS3"),
List.of(new MemberResponse(UUID.randomUUID(), "진호정"))),
new PlanInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
UUID.randomUUID(),
new PlaceDetails(
"카페 온유어마인드",
"https://place.map.kakao.com/1625295669",
"경기 안성시 죽산면 죽산초교길 36-5",
127.420430538257,
37.0766874564298),
new GroupInfoResponse(
UUID.randomUUID(),
UUID.randomUUID(),
"HongDamJin",
"http://someUrlToS3"),
List.of(new MemberResponse(UUID.randomUUID(), "JinHoJeong"))));

given(planService.getPlans()).willReturn(expected);

Expand Down

0 comments on commit c0036ca

Please sign in to comment.