-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Auto Mation <[email protected]>
- Loading branch information
1 parent
95e7e66
commit 92b7993
Showing
163 changed files
with
4,189 additions
and
8 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
...ent/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsByIDTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} | ||
}; | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsKeyByKeyTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} | ||
}; | ||
} | ||
} | ||
} |
188 changes: 188 additions & 0 deletions
188
.../Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductProjectionsTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} | ||
}; | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...equestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductSelectionAssignmentsTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.