From 495bc8e39652b27d6dcfc237f21f58650a0bd226 Mon Sep 17 00:00:00 2001 From: Sunioatm <104454675+Sunioatm@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:44:12 +0700 Subject: [PATCH] fix: change variable name - change to make variable name consistency with dev branch --- src/app/handler/pet/pet.handler_test.go | 26 ++++++++++++------------- src/app/service/pet/pet.service.go | 5 ----- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/app/handler/pet/pet.handler_test.go b/src/app/handler/pet/pet.handler_test.go index ad5e326..659e221 100644 --- a/src/app/handler/pet/pet.handler_test.go +++ b/src/app/handler/pet/pet.handler_test.go @@ -459,16 +459,16 @@ func (t *PetHandlerTest) TestAdoptSuccess() { } expectedResponse := dto.ResponseSuccess{ StatusCode: http.StatusOK, - Message: petconst.AdoptPetSuccessMessage, + Message: petConst.AdoptPetSuccessMessage, Data: adoptByResponse, } controller := gomock.NewController(t.T()) - petSvc := mock_pet.NewMockService(controller) - imageSvc := mock_image.NewMockService(controller) - validator := mock_validator.NewMockIDtoValidator(controller) - context := mock_router.NewMockIContext(controller) + petSvc := petMock.NewMockService(controller) + imageSvc := imageMock.NewMockService(controller) + validator := validatorMock.NewMockIDtoValidator(controller) + context := routerMock.NewMockIContext(controller) context.EXPECT().Param("id").Return(t.Pet.Id, nil) context.EXPECT().Bind(t.AdoptByRequest).Return(nil) @@ -487,10 +487,10 @@ func (t *PetHandlerTest) TestAdoptNotFound() { controller := gomock.NewController(t.T()) - petSvc := mock_pet.NewMockService(controller) - imageSvc := mock_image.NewMockService(controller) - validator := mock_validator.NewMockIDtoValidator(controller) - context := mock_router.NewMockIContext(controller) + petSvc := petMock.NewMockService(controller) + imageSvc := imageMock.NewMockService(controller) + validator := validatorMock.NewMockIDtoValidator(controller) + context := routerMock.NewMockIContext(controller) context.EXPECT().Param("id").Return(t.Pet.Id, nil) context.EXPECT().Bind(t.AdoptByRequest).Return(nil) @@ -509,10 +509,10 @@ func (t *PetHandlerTest) TestAdoptGrpcErr() { controller := gomock.NewController(t.T()) - petSvc := mock_pet.NewMockService(controller) - imageSvc := mock_image.NewMockService(controller) - validator := mock_validator.NewMockIDtoValidator(controller) - context := mock_router.NewMockIContext(controller) + petSvc := petMock.NewMockService(controller) + imageSvc := imageMock.NewMockService(controller) + validator := validatorMock.NewMockIDtoValidator(controller) + context := routerMock.NewMockIContext(controller) context.EXPECT().Param("id").Return(t.Pet.Id, nil) context.EXPECT().Bind(t.AdoptByRequest).Return(nil) diff --git a/src/app/service/pet/pet.service.go b/src/app/service/pet/pet.service.go index d8e8cf1..8cc0401 100644 --- a/src/app/service/pet/pet.service.go +++ b/src/app/service/pet/pet.service.go @@ -18,11 +18,6 @@ type Service struct { petClient petproto.PetServiceClient } -// Adopt implements pet.Service. -func (*Service) Adopt(*dto.AdoptDto) (bool, *dto.ResponseErr) { - panic("unimplemented") -} - func NewService(petClient petproto.PetServiceClient) *Service { return &Service{ petClient: petClient,