diff --git a/src/Sinch/SMS/Batches/DryRun/DryRunResponse.cs b/src/Sinch/SMS/Batches/DryRun/DryRunResponse.cs index 02cdba4..cba10b6 100644 --- a/src/Sinch/SMS/Batches/DryRun/DryRunResponse.cs +++ b/src/Sinch/SMS/Batches/DryRun/DryRunResponse.cs @@ -25,7 +25,7 @@ public class PerRecipient { public string? Recipient { get; set; } - public string? MessagePart { get; set; } + public int? NumberOfParts { get; set; } public string? Body { get; set; } diff --git a/tests/Sinch.Tests/Sms/BatchesTests.cs b/tests/Sinch.Tests/Sms/BatchesTests.cs index 1bcc36b..b529db4 100644 --- a/tests/Sinch.Tests/Sms/BatchesTests.cs +++ b/tests/Sinch.Tests/Sms/BatchesTests.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Json; @@ -241,8 +242,8 @@ public async Task DryRun() number_of_messages = 50, per_recipient = new[] { - new { recipient = "a", message_part = "b", body = "c", encoding = "g" }, - new { recipient = "a", message_part = "b", body = "c", encoding = "g" } + new { recipient = "a", body = "c", encoding = "UTF-8", number_of_parts = 1 }, + new { recipient = "a", body = "c", encoding = "UTF-8", number_of_parts = 3 } } })); @@ -270,6 +271,14 @@ public async Task DryRun() response.PerRecipient.Should().HaveCount(2); response.NumberOfMessages.Should().Be(50); response.NumberOfRecipients.Should().Be(5); + + response.PerRecipient!.First().Should().BeEquivalentTo(new PerRecipient() + { + Body = "c", + Recipient = "a", + NumberOfParts = 1, + Encoding = "UTF-8" + }); } [Fact]