-
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 branch 'master' into prepare-12
- Loading branch information
Showing
50 changed files
with
667 additions
and
66 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
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 |
---|---|---|
@@ -1,52 +1,19 @@ | ||
**Api changes** | ||
|
||
<details> | ||
<summary>Added Property(s)</summary> | ||
<summary>Changed Property(s)</summary> | ||
|
||
- added property `staged` to type `ProductVariantDeletedMessage` | ||
- added property `staged` to type `ProductVariantDeletedMessagePayload` | ||
- added property `warnings` to type `ProductTailoring` | ||
- added property `attributes` to type `ProductVariantTailoring` | ||
- added property `attributes` to type `ProductVariantTailoringDraft` | ||
- added property `attributes` to type `ProductTailoringAddVariantAction` | ||
- added property `warnings` to type `Product` | ||
- added property `customers` to type `SearchIndexingConfiguration` | ||
- :warning: changed property `line` of type `GraphQLErrorLocation` from type `integer` to `number` | ||
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number` | ||
- :warning: changed property `totalPrice` of type `StagedOrder` from type `TypedMoney` to `CentPrecisionMoney` | ||
- :warning: changed property `totalPrice` of type `Order` from type `TypedMoney` to `CentPrecisionMoney` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
<summary>Added QueryParameter(s)</summary> | ||
|
||
- added type `SearchNotReadyError` | ||
- added type `GraphQLSearchNotReadyError` | ||
- added type `ProductTailoringAttribute` | ||
- added type `ProductTailoringSetAttributeAction` | ||
- added type `ProductTailoringSetAttributeInAllVariantsAction` | ||
- added type `ImageProcessingOngoingWarning` | ||
- added type `WarningObject` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Removed Type(s)</summary> | ||
|
||
- :warning: removed type `ProductSearchStatus` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Enum(s)</summary> | ||
|
||
- added enum `customer-group` to type `ExtensionResourceTypeId` | ||
- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId` | ||
- added enum `product-tailoring` to type `ResourceTypeId` | ||
</details> | ||
|
||
**Import changes** | ||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
|
||
- added type `InvalidFieldsUpdateError` | ||
- added query parameter `where` to method `get /{projectKey}/product-selections/key={key}/products` | ||
- added query parameter `where` to method `get /{projectKey}/product-selections/{ID}/products` | ||
</details> | ||
|
37 changes: 37 additions & 0 deletions
37
...tools.Sdk/Tests/commercetools.Api.Serialization.Tests/ProductSearchDeserializationTest.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,37 @@ | ||
using System.IO; | ||
using commercetools.Sdk.Api.Models.ProductSearches; | ||
using Xunit; | ||
|
||
namespace commercetools.Api.Serialization.Tests | ||
{ | ||
public class ProductSearchDeserializationTest : IClassFixture<SerializationFixture> | ||
{ | ||
private readonly SerializationFixture _serializationFixture; | ||
|
||
public ProductSearchDeserializationTest(SerializationFixture serializationFixture) | ||
{ | ||
this._serializationFixture = serializationFixture; | ||
} | ||
|
||
[Fact] | ||
public void FacetDeserialization() | ||
{ | ||
var serializerService = this._serializationFixture.SerializerService; | ||
var serialized = File.ReadAllText("Resources/ProductSearch/facets.json"); | ||
var deserialized = serializerService.Deserialize<IProductPagedSearchResponse>(serialized); | ||
Assert.NotNull(deserialized); | ||
var facets = deserialized.Facets; | ||
var bucket = Assert.IsAssignableFrom<IProductSearchFacetResultBucket>(facets[0]); | ||
Assert.Equal("supplierName", bucket.Name); | ||
Assert.Equal("Example Inc.", bucket.Buckets[0].Key); | ||
Assert.Equal(77, bucket.Buckets[0].Count); | ||
var count = Assert.IsAssignableFrom<IProductSearchFacetResultCount>(facets[1]); | ||
Assert.Equal("supplierCounts", count.Name); | ||
Assert.Equal(10, count.Value); | ||
|
||
var serialize = serializerService.Serialize(deserialized); | ||
|
||
Assert.Equal("{\"total\":0,\"offset\":0,\"limit\":0,\"facets\":[{\"name\":\"supplierName\",\"buckets\":[{\"key\":\"Example Inc.\",\"count\":77}]},{\"name\":\"supplierCounts\",\"value\":10}]}", serialize); | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...tools.Sdk/Tests/commercetools.Api.Serialization.Tests/Resources/ProductSearch/facets.json
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,20 @@ | ||
{ | ||
"total":0, | ||
"offset": 0, | ||
"limit": 0, | ||
"facets": [ | ||
{ | ||
"name": "supplierName", | ||
"buckets": [ | ||
{ | ||
"key": "Example Inc.", | ||
"count": 77 | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "supplierCounts", | ||
"value": 10 | ||
} | ||
] | ||
} |
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
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
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
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
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
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
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
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
Oops, something went wrong.