Skip to content

Commit

Permalink
delete not useble ErrorMassage veriable SAME_START_TIME_AND_FINISH_TI…
Browse files Browse the repository at this point in the history
…ME_IN_EVENT_DATE
  • Loading branch information
VasylyshynDmytro committed Dec 3, 2024
1 parent f27bf9c commit 8ecefbf
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 6 deletions.
6 changes: 6 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,12 @@
<artifactId>jsoup</artifactId>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
6 changes: 6 additions & 0 deletions dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,11 @@
<artifactId>commons-lang3</artifactId>
<version>${commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
6 changes: 6 additions & 0 deletions service-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,11 @@
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ public class ErrorMessage {
"Start date must be in future and before finish date";
public static final String SAME_EVENT_DATES =
"User shouldn't be able to create event with the same event dates for two days within one event";
public static final String SAME_START_TIME_AND_FINISH_TIME_IN_EVENT_DATE =
"The start time coincides with the end time on one of the event dates";
public static final String FILTER_NOT_FOUND_BY_ID = "Filter not found";
public static final String HAVE_ALREADY_SUBSCRIBED_ON_EVENT = "You have already subscribed on this event";
public static final String EVENT_NOT_FOUND = "Event hasn't been found";
Expand Down
7 changes: 7 additions & 0 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,12 @@
<artifactId>commons-collections4</artifactId>
<version>${commons.collections4.version}</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ private void checkingEqualityDateTimeInEventDateLocationDto(List<EventDateLocati
throw new IllegalArgumentException(ErrorMessage.INVALID_DURATION_BETWEEN_START_AND_FINISH);
});
}

}

private Event findEventId(Long id) {
Expand Down
2 changes: 0 additions & 2 deletions service/src/test/java/greencity/ModelUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3158,7 +3158,6 @@ public static SearchPlacesDto getSearchPlacesDto() {
.build();
}


public static List<EventDateLocationDto> getEventDateLocationDtoWithInvalidDuration() {
ZoneId zoneId = ZoneId.of("Europe/Kiev");

Expand All @@ -3173,5 +3172,4 @@ public static List<EventDateLocationDto> getEventDateLocationDtoWithInvalidDurat
return List.of(invalidDto1, invalidDto2);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ void shouldThrowIllegalArgumentExceptionWhenDurationIsLessThan30Minutes() throws
List<EventDateLocationDto> eventDateLocationDtos = ModelUtils.getEventDateLocationDtoWithInvalidDuration();

Method method = EventServiceImpl.class.getDeclaredMethod(
"checkingEqualityDateTimeInEventDateLocationDto", List.class);
"checkingEqualityDateTimeInEventDateLocationDto", List.class);
method.setAccessible(true);

InvocationTargetException exception = assertThrows(InvocationTargetException.class, () -> {
Expand Down

0 comments on commit 8ecefbf

Please sign in to comment.