Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
**Api changes**

<details>
<summary>Changed Property(s)</summary>
<summary>Added Property(s)</summary>

- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]`
- added property `published` to type `ShoppingListLineItem`
</details>


<details>
<summary>Added Property(s)</summary>
<summary>Changed Property(s)</summary>

- added property `published` to type `ShoppingListLineItem`
- :warning: changed property `actions` of type `MyBusinessUnitUpdate` from type `BusinessUnitUpdateAction[]` to `MyBusinessUnitUpdateAction[]`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import java.util.concurrent.CompletableFuture;

import com.commercetools.api.client.ApiRoot;
import com.tngtech.junit.dataprovider.DataProvider;
import com.tngtech.junit.dataprovider.DataProviderExtension;
import com.tngtech.junit.dataprovider.UseDataProvider;
import com.tngtech.junit.dataprovider.UseDataProviderExtension;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.ApiHttpClient;
Expand All @@ -19,28 +15,26 @@
import io.vrap.rmf.base.client.utils.Generated;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@ExtendWith(UseDataProviderExtension.class)
@ExtendWith(DataProviderExtension.class)
public class ByProjectKeyApiClientsByIDTest {
private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
private final String projectKey = "test_projectKey";
private final static ApiRoot apiRoot = ApiRoot.of();
private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();

@TestTemplate
@UseDataProvider("requestWithMethodParameters")
@ParameterizedTest
@MethodSource("requestWithMethodParameters")
public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -50,8 +44,8 @@ public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiServerException.class);
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -61,7 +55,6 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiClientException.class);
}

@DataProvider
public static Object[][] requestWithMethodParameters() {
return new Object[][] { new Object[] {
apiRoot.withProjectKey("test_projectKey").apiClients().withId("test_ID").get().createHttpRequest(),
Expand All @@ -78,7 +71,6 @@ public static Object[][] requestWithMethodParameters() {
.createHttpRequest(), "delete", "test_projectKey/api-clients/test_ID", } };
}

@DataProvider
public static Object[][] executeMethodParameters() {
return new Object[][] {
new Object[] { apiRoot.withProjectKey("test_projectKey").apiClients().withId("test_ID").get(), },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import java.util.concurrent.CompletableFuture;

import com.commercetools.api.client.ApiRoot;
import com.tngtech.junit.dataprovider.DataProvider;
import com.tngtech.junit.dataprovider.DataProviderExtension;
import com.tngtech.junit.dataprovider.UseDataProvider;
import com.tngtech.junit.dataprovider.UseDataProviderExtension;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.ApiHttpClient;
Expand All @@ -19,28 +15,26 @@
import io.vrap.rmf.base.client.utils.Generated;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@ExtendWith(UseDataProviderExtension.class)
@ExtendWith(DataProviderExtension.class)
public class ByProjectKeyApiClientsTest {
private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
private final String projectKey = "test_projectKey";
private final static ApiRoot apiRoot = ApiRoot.of();
private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();

@TestTemplate
@UseDataProvider("requestWithMethodParameters")
@ParameterizedTest
@MethodSource("requestWithMethodParameters")
public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -50,8 +44,8 @@ public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiServerException.class);
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -61,7 +55,6 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiClientException.class);
}

@DataProvider
public static Object[][] requestWithMethodParameters() {
return new Object[][] { new Object[] {
apiRoot.withProjectKey("test_projectKey").apiClients().get().withExpand("expand").createHttpRequest(),
Expand Down Expand Up @@ -112,7 +105,6 @@ public static Object[][] requestWithMethodParameters() {
.createHttpRequest(), "post", "test_projectKey/api-clients", } };
}

@DataProvider
public static Object[][] executeMethodParameters() {
return new Object[][] {
new Object[] { apiRoot.withProjectKey("test_projectKey").apiClients().get().withExpand("expand"), },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import java.util.concurrent.CompletableFuture;

import com.commercetools.api.client.ApiRoot;
import com.tngtech.junit.dataprovider.DataProvider;
import com.tngtech.junit.dataprovider.DataProviderExtension;
import com.tngtech.junit.dataprovider.UseDataProvider;
import com.tngtech.junit.dataprovider.UseDataProviderExtension;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.ApiHttpClient;
Expand All @@ -19,28 +15,26 @@
import io.vrap.rmf.base.client.utils.Generated;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@ExtendWith(UseDataProviderExtension.class)
@ExtendWith(DataProviderExtension.class)
public class ByProjectKeyAsAssociateByAssociateIdBusinessUnitsByIDTest {
private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
private final String projectKey = "test_projectKey";
private final static ApiRoot apiRoot = ApiRoot.of();
private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();

@TestTemplate
@UseDataProvider("requestWithMethodParameters")
@ParameterizedTest
@MethodSource("requestWithMethodParameters")
public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -50,8 +44,8 @@ public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiServerException.class);
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -61,7 +55,6 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiClientException.class);
}

@DataProvider
public static Object[][] requestWithMethodParameters() {
return new Object[][] {
new Object[] {
Expand Down Expand Up @@ -113,7 +106,6 @@ public static Object[][] requestWithMethodParameters() {
"post", "test_projectKey/as-associate/test_associateId/business-units/test_ID", } };
}

@DataProvider
public static Object[][] executeMethodParameters() {
return new Object[][] {
new Object[] { apiRoot.withProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import java.util.concurrent.CompletableFuture;

import com.commercetools.api.client.ApiRoot;
import com.tngtech.junit.dataprovider.DataProvider;
import com.tngtech.junit.dataprovider.DataProviderExtension;
import com.tngtech.junit.dataprovider.UseDataProvider;
import com.tngtech.junit.dataprovider.UseDataProviderExtension;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.ApiHttpClient;
Expand All @@ -19,28 +15,26 @@
import io.vrap.rmf.base.client.utils.Generated;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@ExtendWith(UseDataProviderExtension.class)
@ExtendWith(DataProviderExtension.class)
public class ByProjectKeyAsAssociateByAssociateIdBusinessUnitsKeyByKeyTest {
private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
private final String projectKey = "test_projectKey";
private final static ApiRoot apiRoot = ApiRoot.of();
private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();

@TestTemplate
@UseDataProvider("requestWithMethodParameters")
@ParameterizedTest
@MethodSource("requestWithMethodParameters")
public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -50,8 +44,8 @@ public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiServerException.class);
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -61,7 +55,6 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiClientException.class);
}

@DataProvider
public static Object[][] requestWithMethodParameters() {
return new Object[][] {
new Object[] {
Expand Down Expand Up @@ -115,7 +108,6 @@ public static Object[][] requestWithMethodParameters() {
"post", "test_projectKey/as-associate/test_associateId/business-units/key=test_key", } };
}

@DataProvider
public static Object[][] executeMethodParameters() {
return new Object[][] {
new Object[] { apiRoot.withProjectKey("test_projectKey")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import java.util.concurrent.CompletableFuture;

import com.commercetools.api.client.ApiRoot;
import com.tngtech.junit.dataprovider.DataProvider;
import com.tngtech.junit.dataprovider.DataProviderExtension;
import com.tngtech.junit.dataprovider.UseDataProvider;
import com.tngtech.junit.dataprovider.UseDataProviderExtension;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.ApiHttpClient;
Expand All @@ -19,28 +15,26 @@
import io.vrap.rmf.base.client.utils.Generated;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.TestTemplate;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mockito;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
@ExtendWith(UseDataProviderExtension.class)
@ExtendWith(DataProviderExtension.class)
public class ByProjectKeyAsAssociateByAssociateIdBusinessUnitsTest {
private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
private final String projectKey = "test_projectKey";
private final static ApiRoot apiRoot = ApiRoot.of();
private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();

@TestTemplate
@UseDataProvider("requestWithMethodParameters")
@ParameterizedTest
@MethodSource("requestWithMethodParameters")
public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -50,8 +44,8 @@ public void executeServerException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiServerException.class);
}

@TestTemplate
@UseDataProvider("executeMethodParameters")
@ParameterizedTest
@MethodSource("executeMethodParameters")
public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exception {
Mockito.when(httpClientMock.execute(Mockito.any()))
.thenReturn(CompletableFuture.completedFuture(
Expand All @@ -61,7 +55,6 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
.hasCauseInstanceOf(ApiClientException.class);
}

@DataProvider
public static Object[][] requestWithMethodParameters() {
return new Object[][] {
new Object[] {
Expand Down Expand Up @@ -172,7 +165,6 @@ public static Object[][] requestWithMethodParameters() {
"post", "test_projectKey/as-associate/test_associateId/business-units", } };
}

@DataProvider
public static Object[][] executeMethodParameters() {
return new Object[][] {
new Object[] { apiRoot.withProjectKey("test_projectKey")
Expand Down
Loading
Loading