Skip to content

Commit

Permalink
Update generated SDKs (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: Auto Mation <[email protected]>
  • Loading branch information
github-actions[bot] and Auto Mation authored Jan 25, 2022
1 parent 95e7e66 commit 92b7993
Show file tree
Hide file tree
Showing 163 changed files with 4,189 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

namespace commercetools.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithId("test_ID")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/test_ID?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithId("test_ID")
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/test_ID",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

namespace commercetools.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithKey("test_key")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.WithKey("test_key")
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections/key=test_key",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

namespace commercetools.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductProjectionsTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithStaged(true)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?staged=true",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithPriceCurrency("priceCurrency")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?priceCurrency=priceCurrency",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithPriceCountry("priceCountry")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?priceCountry=priceCountry",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithPriceCustomerGroup("priceCustomerGroup")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?priceCustomerGroup=priceCustomerGroup",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithPriceChannel("priceChannel")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?priceChannel=priceChannel",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithLocaleProjection("localeProjection")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?localeProjection=localeProjection",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithStoreProjection("storeProjection")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?storeProjection=storeProjection",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithSort("sort")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?sort=sort",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithLimit(7)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?limit=7",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithOffset(3)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?offset=3",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithWithTotal(true)
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?withTotal=true",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithWhere("where")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?where=where",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.WithPredicateVar("varName", "var.varName")
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections?var.varName=var.varName",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductProjections()
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-projections",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

namespace commercetools.Api.Tests.Client.RequestBuilders.InStore
{
public class ByProjectKeyInStoreKeyByStoreKeyProductSelectionAssignmentsTest : RequestBuilderParentTests
{
[Theory]
[MemberData(nameof(GetData))]
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
{
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
}

public static IEnumerable<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.InStoreKeyWithStoreKeyValue("test_storeKey")
.ProductSelectionAssignments()
.Get()
.Build(),
"Get",
"/test_projectKey/in-store/key=test_storeKey/product-selection-assignments",
}
};
}
}
}
Loading

0 comments on commit 92b7993

Please sign in to comment.