-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update contact now provides update_mask
- Loading branch information
Showing
6 changed files
with
132 additions
and
13 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System.Collections.Generic; | ||
using FluentAssertions; | ||
using Sinch.Conversation; | ||
using Sinch.Conversation.Contacts; | ||
using Sinch.Conversation.Messages; | ||
using Xunit; | ||
|
||
namespace Sinch.Tests.Conversation | ||
{ | ||
public class ContactsTests : ConversationTestBase | ||
{ | ||
[Fact] | ||
public void ContactMaskTwoFields() | ||
{ | ||
var contact = new Contact() | ||
{ | ||
DisplayName = "hola", | ||
Metadata = null | ||
}; | ||
contact.GetPropertiesMask().Should().BeEquivalentTo("display_name,metadata"); | ||
} | ||
|
||
[Fact] | ||
public void ContactMaskAllFields() | ||
{ | ||
var contact = new Contact() | ||
{ | ||
DisplayName = "hola", | ||
Metadata = "aaaa", | ||
ExternalId = "id", | ||
ChannelPriority = new List<ConversationChannel>(), | ||
Email = "mail", | ||
ChannelIdentities = new List<ChannelIdentity>(), | ||
Language = "lang", | ||
Id = "id", | ||
}; | ||
contact.GetPropertiesMask().Should() | ||
.BeEquivalentTo( | ||
"display_name,metadata,external_id,channel_priority,email,channel_identities,language,id"); | ||
} | ||
} | ||
} |
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