diff --git a/test/LEGO.AsyncAPI.Tests/Models/AsyncApiReference_Should.cs b/test/LEGO.AsyncAPI.Tests/Models/AsyncApiReference_Should.cs index 16d58b4c..0bac428f 100644 --- a/test/LEGO.AsyncAPI.Tests/Models/AsyncApiReference_Should.cs +++ b/test/LEGO.AsyncAPI.Tests/Models/AsyncApiReference_Should.cs @@ -312,7 +312,10 @@ public void AsyncApiReference_WithExternalResourcesInterface_DeserializesCorrect var message = doc.Channels["workspace"].Publish.Message.First(); message.Name.Should().Be("Test"); var payload = message.Payload.As(); - payload.Properties.Count.Should().Be(3); + payload.Properties.Count.Should().Be(4); + payload.Properties["orderHistory"].Properties.Count.Should().Be(2); + payload.Properties["orderHistory"].Properties["historyStorageRecord"].Properties.First().Key.Should() + .Be("historyLog"); } [Test] @@ -426,6 +429,8 @@ public string Load(string reference) userName: description: User name. type: string + orderHistory: + $ref: '#/components/schemas/OrderHistory' required: - orderId example: @@ -434,6 +439,24 @@ public string Load(string reference) orderDetails: userId: Admin userName: Admin + components: + schemas: + OrderHistory: + type: object + properties: + historyId: + description: ID for order history storage + type: string + format: uuid + historyStorageRecord: + $ref: '#/components/schemas/HistoryStorageRecord' + HistoryStorageRecord: + type: object + properties: + historyLog: + type: array + items: + type: string """; } }