Skip to content

Commit

Permalink
Delete unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
salander85 committed Oct 24, 2023
1 parent aa93239 commit 34ee7cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ private static ProjectApiRoot getCtpClient(@Nonnull final String propertiesPrefi
properties = loadFromEnvVars(propertiesPrefix);
}
if (properties.isEmpty()) {
throw new InvalidPropertiesFormatException("Please provide CTP credentials for running project sync.");
throw new InvalidPropertiesFormatException(
"Please provide CTP credentials for running project sync.");
}

final String projectKey =
Expand All @@ -52,7 +53,7 @@ private static ProjectApiRoot getCtpClient(@Nonnull final String propertiesPrefi
extract(properties, propertiesPrefix, PROPERTIES_KEY_CLIENT_ID_SUFFIX);
final String clientSecret =
extract(properties, propertiesPrefix, PROPERTIES_KEY_CLIENT_SECRET_SUFFIX);
final String apiUrl =
final String apiUrl =
extract(
properties,
propertiesPrefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ void sync_WithUnknownOptionValue_ShouldCompleteExceptionallyWithIllegalArgumentE
@SuppressWarnings("unchecked")
void sync_AsProductsDeltaSync_ShouldBuildSyncerAndExecuteSync() {
// preparation
final ZonedDateTime currentCtpTimestamp = ZonedDateTime.now();
stubClientsCustomObjectService(targetClient, currentCtpTimestamp);
stubClientsCustomObjectService(targetClient, ZonedDateTime.now());

final SyncerFactory syncerFactory =
SyncerFactory.of(() -> sourceClient, () -> targetClient, getMockedClock());
Expand Down Expand Up @@ -265,8 +264,7 @@ void sync_AsProductsDeltaSync_ShouldBuildSyncerAndExecuteSync() {
@SuppressWarnings("unchecked")
void sync_AsProductsFullSync_ShouldBuildSyncerAndExecuteSync() {
// preparation
final ZonedDateTime currentCtpTimestamp = ZonedDateTime.now();
stubClientsCustomObjectService(targetClient, currentCtpTimestamp);
stubClientsCustomObjectService(targetClient, ZonedDateTime.now());

final SyncerFactory syncerFactory =
SyncerFactory.of(() -> sourceClient, () -> targetClient, getMockedClock());
Expand Down Expand Up @@ -704,8 +702,7 @@ private static <T> String createJsonStringFromPagedQueryResponse(
@SuppressWarnings("unchecked")
void sync_AsCategoriesDeltaSync_ShouldBuildSyncerAndExecuteSync() {
// preparation
final ZonedDateTime currentCtpTimestamp = ZonedDateTime.now();
stubClientsCustomObjectService(targetClient, currentCtpTimestamp);
stubClientsCustomObjectService(targetClient, ZonedDateTime.now());

final SyncerFactory syncerFactory =
SyncerFactory.of(() -> sourceClient, () -> targetClient, getMockedClock());
Expand Down Expand Up @@ -757,8 +754,7 @@ void sync_AsCategoriesDeltaSync_ShouldBuildSyncerAndExecuteSync() {
@SuppressWarnings("unchecked")
void sync_AsProductTypesDeltaSync_ShouldBuildSyncerAndExecuteSync() {
// preparation
final ZonedDateTime currentCtpTimestamp = ZonedDateTime.now();
stubClientsCustomObjectService(targetClient, currentCtpTimestamp);
stubClientsCustomObjectService(targetClient, ZonedDateTime.now());

final SyncerFactory syncerFactory =
SyncerFactory.of(() -> sourceClient, () -> targetClient, getMockedClock());
Expand Down Expand Up @@ -813,7 +809,6 @@ void sync_AsProductTypesDeltaSync_ShouldBuildSyncerAndExecuteSync() {
@SuppressWarnings("unchecked")
void sync_AsTypesDeltaSync_ShouldBuildSyncerAndExecuteSync() {
// preparation
final ZonedDateTime currentCtpTimestamp = ZonedDateTime.now();
stubClientsCustomObjectService(targetClient, ZonedDateTime.now());

final SyncerFactory syncerFactory =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public static void stubClientsCustomObjectService(

public static ProjectApiRoot withTestClient(
final String projectKey,
final TriFunction<String, ApiHttpMethod, String, CompletableFuture<ApiHttpResponse<byte[]>>> fn) {
final TriFunction<String, ApiHttpMethod, String, CompletableFuture<ApiHttpResponse<byte[]>>>
fn) {
return ApiRootBuilder.of(
request -> {
final String uri = request.getUri() != null ? request.getUri().toString() : "";
Expand Down

0 comments on commit 34ee7cd

Please sign in to comment.