-
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.
Merge pull request #249 from commercetools/gen-sdk-updates
Update generated SDKs
- Loading branch information
Showing
287 changed files
with
11,785 additions
and
61 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
79 changes: 79 additions & 0 deletions
79
...jectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsByIDTest.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,79 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using Xunit; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.AsAssociate | ||
{ | ||
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsByIDTest : 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") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.WithId("test_ID") | ||
.Get() | ||
.WithExpand("expand") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.WithId("test_ID") | ||
.Get() | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.WithId("test_ID") | ||
.Post(null) | ||
.WithExpand("expand") | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.WithId("test_ID") | ||
.Post(null) | ||
.Build(), | ||
"Post", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows/test_ID", | ||
} | ||
}; | ||
} | ||
} | ||
} |
128 changes: 128 additions & 0 deletions
128
...yProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsTest.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,128 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Http; | ||
using Xunit; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.AsAssociate | ||
{ | ||
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyApprovalFlowsTest : 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") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithExpand("expand") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?expand=expand", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithSort("sort") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?sort=sort", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithLimit(7) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?limit=7", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithOffset(3) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?offset=3", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithWithTotal(true) | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?withTotal=true", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithWhere("where") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?where=where", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.WithPredicateVar("varName", "var.varName") | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows?var.varName=var.varName", | ||
}, | ||
new Object[] { | ||
ApiRoot | ||
.WithProjectKey("test_projectKey") | ||
.AsAssociate() | ||
.WithAssociateIdValue("test_associateId") | ||
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey") | ||
.ApprovalFlows() | ||
.Get() | ||
.Build(), | ||
"Get", | ||
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/approval-flows", | ||
} | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.