Search in sources :

Example 1 with MemberResponse

use of wooteco.prolog.member.application.dto.MemberResponse in project prolog by woowacourse.

the class MemberStepDefinitions method 멤버정보가조회된다.

@Then("멤버 정보가 조회된다")
public void 멤버정보가조회된다() {
    MemberResponse member = context.response.as(MemberResponse.class);
    assertThat(member.getImageUrl()).isNotNull();
}
Also used : MemberResponse(wooteco.prolog.member.application.dto.MemberResponse) Then(io.cucumber.java.en.Then)

Example 2 with MemberResponse

use of wooteco.prolog.member.application.dto.MemberResponse in project prolog by woowacourse.

the class FilterController method showAll.

@GetMapping
public ResponseEntity<FilterResponse> showAll() {
    List<LevelResponse> levelResponses = levelService.findAll();
    List<MissionResponse> missionResponses = missionService.findAll();
    List<TagResponse> tagResponses = tagService.findTagsIncludedInStudylogs();
    List<MemberResponse> memberResponses = memberService.findAll();
    return ResponseEntity.ok().body(new FilterResponse(levelResponses, missionResponses, tagResponses, memberResponses));
}
Also used : MemberResponse(wooteco.prolog.member.application.dto.MemberResponse) MissionResponse(wooteco.prolog.studylog.application.dto.MissionResponse) TagResponse(wooteco.prolog.studylog.application.dto.TagResponse) FilterResponse(wooteco.prolog.studylog.application.dto.FilterResponse) LevelResponse(wooteco.prolog.studylog.application.dto.LevelResponse) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 3 with MemberResponse

use of wooteco.prolog.member.application.dto.MemberResponse in project prolog by woowacourse.

the class StudylogScrapServiceTest method registerScrapTest.

@DisplayName("스크랩 등록기능 확인")
@Test
void registerScrapTest() {
    // given
    MemberScrapResponse memberScrapResponse = studylogScrapService.registerScrap(member.getId(), studylog.getId());
    // when
    MemberResponse memberResponse = memberScrapResponse.getMemberResponse();
    StudylogResponse studylogResponse = memberScrapResponse.getStudylogResponse();
    // then
    assertThat(member.getId()).isEqualTo(memberResponse.getId());
    assertThat(studylog.getId()).isEqualTo(studylogResponse.getId());
}
Also used : MemberScrapResponse(wooteco.prolog.member.application.dto.MemberScrapResponse) MemberResponse(wooteco.prolog.member.application.dto.MemberResponse) StudylogResponse(wooteco.prolog.studylog.application.dto.StudylogResponse) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) IntegrationTest(wooteco.support.utils.IntegrationTest) DisplayName(org.junit.jupiter.api.DisplayName)

Example 4 with MemberResponse

use of wooteco.prolog.member.application.dto.MemberResponse in project prolog by woowacourse.

the class MemberServiceTest method findMemberResponseByUsernameTest.

@DisplayName("Username을 통해서 MemberResponse를 조회한다.")
@Test
void findMemberResponseByUsernameTest() {
    // given
    Member savedMember = Member를_생성한다(new Member("gracefulBrown", "브라운", Role.CREW, 1L, "imageUrl"));
    MemberResponse expectMemberResponse = MemberResponse.of(savedMember);
    // when
    MemberResponse foundMemberResponse = memberService.findMemberResponseByUsername(savedMember.getUsername());
    // then
    assertThat(foundMemberResponse).usingRecursiveComparison().isEqualTo(expectMemberResponse);
}
Also used : MemberResponse(wooteco.prolog.member.application.dto.MemberResponse) Member(wooteco.prolog.member.domain.Member) LoginMember(wooteco.prolog.login.ui.LoginMember) Test(org.junit.jupiter.api.Test) IntegrationTest(wooteco.support.utils.IntegrationTest) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

MemberResponse (wooteco.prolog.member.application.dto.MemberResponse)4 DisplayName (org.junit.jupiter.api.DisplayName)2 Test (org.junit.jupiter.api.Test)2 IntegrationTest (wooteco.support.utils.IntegrationTest)2 Then (io.cucumber.java.en.Then)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1 LoginMember (wooteco.prolog.login.ui.LoginMember)1 MemberScrapResponse (wooteco.prolog.member.application.dto.MemberScrapResponse)1 Member (wooteco.prolog.member.domain.Member)1 FilterResponse (wooteco.prolog.studylog.application.dto.FilterResponse)1 LevelResponse (wooteco.prolog.studylog.application.dto.LevelResponse)1 MissionResponse (wooteco.prolog.studylog.application.dto.MissionResponse)1 StudylogResponse (wooteco.prolog.studylog.application.dto.StudylogResponse)1 TagResponse (wooteco.prolog.studylog.application.dto.TagResponse)1