-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DX-2967 Fix Bug in
BandwidthCallbackMessage
Model
`BandwidthCallbackMessage.ErrorCode` was incorrectly defined as a string. This change sets it to the correct type, `int`.
- Loading branch information
1 parent
852b1b2
commit 20bf86c
Showing
2 changed files
with
30 additions
and
4 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
26 changes: 26 additions & 0 deletions
26
Bandwidth.StandardTests/Messaging/BandwidthCallbackMessageTests.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,26 @@ | ||
using Bandwidth.Standard.Messaging.Models; | ||
using Xunit; | ||
|
||
namespace Bandwidth.StandardTests.Messaging | ||
{ | ||
public class BandwidthCallbackMessageTests | ||
{ | ||
[Fact] | ||
public void InitializeMessagingCallbackModel() | ||
{ | ||
BandwidthMessage testMessage = new BandwidthMessage(); | ||
|
||
BandwidthCallbackMessage testCallback = new BandwidthCallbackMessage( | ||
time: "2016-09-14T18:20:16Z", | ||
type: "message-failed", | ||
to: "+52345678903", | ||
errorCode: 4432, | ||
description: "forbidden to country", | ||
message: testMessage | ||
); | ||
|
||
Assert.Equal("BandwidthCallbackMessage : (this.Time = 2016-09-14T18:20:16Z, this.Type = message-failed, this.To = +52345678903, this.ErrorCode = 4432, this.Description = forbidden to country, this.Message = BandwidthMessage : (this.Id = null, this.Owner = null, this.ApplicationId = null, this.Time = null, this.SegmentCount = null, this.Direction = null, this.To = null, this.From = null, this.Media = null, this.Text = null, this.Tag = null, this.Priority = null))", testCallback.ToString()); | ||
Assert.IsType<int>(testCallback.ErrorCode); | ||
} | ||
} | ||
} |