-
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.
- Loading branch information
1 parent
aaf8c05
commit 068978c
Showing
145 changed files
with
7,187 additions
and
0 deletions.
There are no files selected for viewing
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
133 changes: 133 additions & 0 deletions
133
...ed/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest.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,133 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using Xunit; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore | ||
{ | ||
public class ByProjectKeyInStoreKeyByStoreKeyProductTailoringTest : 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") | ||
.ProductTailoring() | ||
.Get() | ||
.WithLimit(7) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?limit=7", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithOffset(3) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?offset=3", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithWithTotal(true) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?withTotal=true", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithExpand("expand") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithWhere("where") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?where=where", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithPredicateVar("varName", "var.varName") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?var.varName=var.varName", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.WithSort("sort") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?sort=sort", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Get() | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Post(null) | ||
.WithExpand("expand") | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.ProductTailoring() | ||
.Post(null) | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/in-store/key=test_storeKey/product-tailoring", | ||
} | ||
}; | ||
} | ||
} | ||
} |
113 changes: 113 additions & 0 deletions
113
...ilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest.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,113 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using Xunit; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore | ||
{ | ||
public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringTest : 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") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Get() | ||
.WithExpand("expand") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Get() | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Post(null) | ||
.WithExpand("expand") | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Post(null) | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Delete() | ||
.WithVersion(2) | ||
.Build(), | ||
"Delete", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?version=2", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Delete() | ||
.WithExpand("expand") | ||
.Build(), | ||
"Delete", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.InStoreKeyWithStoreKeyValue("test_storeKey") | ||
.Products() | ||
.WithProductId("test_productID") | ||
.ProductTailoring() | ||
.Delete() | ||
.Build(), | ||
"Delete", | ||
"/test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring", | ||
} | ||
}; | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest.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,17 @@ | ||
using System.Collections.Generic; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore | ||
{ | ||
public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDTest : RequestBuilderParentTests | ||
{ | ||
|
||
|
||
public static IEnumerable<object[]> GetData() | ||
{ | ||
return new List<object[]> | ||
{ | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.