Skip to content

Commit

Permalink
remove wildcard imports
Browse files Browse the repository at this point in the history
  • Loading branch information
VasylyshynDmytro committed Dec 13, 2024
1 parent 4d6bdce commit 30bd6d2
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 17 deletions.
14 changes: 13 additions & 1 deletion core/src/main/java/greencity/controller/PlaceController.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@
import greencity.dto.PageableDto;
import greencity.dto.favoriteplace.FavoritePlaceDto;
import greencity.dto.filter.FilterPlaceDto;
import greencity.dto.place.*;
import greencity.dto.place.PlaceAddDto;
import greencity.dto.place.PlaceInfoDto;
import greencity.dto.place.PlaceUpdateDto;
import greencity.dto.place.PlaceWithUserDto;
import greencity.dto.place.PlaceByBoundsDto;
import greencity.dto.place.AdminPlaceDto;
import greencity.dto.place.UpdatePlaceStatusWithUserEmailDto;
import greencity.dto.place.UpdatePlaceStatusDto;
import greencity.dto.place.PlaceVO;
import greencity.dto.place.BulkUpdatePlaceStatusDto;
import greencity.dto.place.FilterPlaceCategory;
import greencity.dto.place.PlaceResponse;
import greencity.dto.place.AddPlaceDto;
import greencity.dto.user.UserVO;
import greencity.enums.PlaceStatus;
import greencity.service.FavoritePlaceService;
Expand Down
15 changes: 11 additions & 4 deletions core/src/test/java/greencity/controller/PlaceControllerTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package greencity.controller;

import greencity.constant.ErrorMessage;
import greencity.converters.UserArgumentResolver;
import greencity.dto.place.*;
import greencity.dto.place.PlaceAddDto;
import greencity.dto.place.PlaceUpdateDto;
import greencity.dto.place.PlaceVO;
import greencity.dto.place.UpdatePlaceStatusWithUserEmailDto;
import greencity.dto.place.AddPlaceDto;
import greencity.dto.place.BulkUpdatePlaceStatusDto;
import greencity.dto.place.PlaceWithUserDto;
import greencity.entity.Place;
import greencity.enums.PlaceStatus;
import greencity.exception.exceptions.NotFoundException;
import greencity.service.UserService;
import java.security.Principal;
import java.time.DayOfWeek;
Expand Down Expand Up @@ -53,7 +57,10 @@
import static greencity.ModelUtils.getUserVO;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.doNothing;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,23 @@

import greencity.enums.PlaceStatus;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.*;

@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
@ToString
@Data
public class UpdatePlaceStatusWithUserEmailDto {
@NotNull
@NotBlank
private String placeName;

@NotNull
private PlaceStatus newStatus;

@NotNull
@NotBlank
private String userName;

@NotNull
@Email
private String email;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package greencity.message;

import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Getter
public class ScheduledEmailMessage implements EmailMessage {
private String username;
private String email;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@
import org.springframework.web.context.request.RequestContextHolder;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.times;

@ExtendWith(MockitoExtension.class)
class RestClientTest {
Expand Down
14 changes: 13 additions & 1 deletion service/src/main/java/greencity/service/PlaceServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
import greencity.dto.openhours.OpenHoursDto;
import greencity.dto.openhours.OpeningHoursDto;
import greencity.dto.openhours.OpeningHoursVO;
import greencity.dto.place.*;
import greencity.dto.place.PlaceByBoundsDto;
import greencity.dto.place.UpdatePlaceStatusWithUserEmailDto;
import greencity.dto.place.AddPlaceDto;
import greencity.dto.place.PlaceResponse;
import greencity.dto.place.FilterPlaceCategory;
import greencity.dto.place.FilterAdminPlaceDto;
import greencity.dto.place.PlaceInfoDto;
import greencity.dto.place.BulkUpdatePlaceStatusDto;
import greencity.dto.place.UpdatePlaceStatusDto;
import greencity.dto.place.AdminPlaceDto;
import greencity.dto.place.PlaceAddDto;
import greencity.dto.place.PlaceUpdateDto;
import greencity.dto.place.PlaceVO;
import greencity.dto.search.SearchPlacesDto;
import greencity.dto.user.UserVO;
import greencity.entity.Category;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@
import greencity.dto.language.LanguageVO;
import greencity.dto.location.LocationAddressAndGeoForUpdateDto;
import greencity.dto.location.LocationVO;
import greencity.dto.place.*;
import greencity.dto.place.PlaceByBoundsDto;
import greencity.dto.place.UpdatePlaceStatusWithUserEmailDto;
import greencity.dto.place.AddPlaceDto;
import greencity.dto.place.PlaceResponse;
import greencity.dto.place.FilterPlaceCategory;
import greencity.dto.place.FilterAdminPlaceDto;
import greencity.dto.place.PlaceInfoDto;
import greencity.dto.place.BulkUpdatePlaceStatusDto;
import greencity.dto.place.UpdatePlaceStatusDto;
import greencity.dto.place.AdminPlaceDto;
import greencity.dto.place.PlaceAddDto;
import greencity.dto.place.PlaceUpdateDto;
import greencity.dto.place.PlaceVO;
import greencity.dto.search.SearchPlacesDto;
import greencity.dto.user.UserVO;
import greencity.entity.Category;
Expand Down

0 comments on commit 30bd6d2

Please sign in to comment.