public void SerializePhoneNumber(string?expectedRawId) { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new PhoneNumberIdentifier(TestPhoneNumber, expectedRawId)); Assert.AreEqual(TestPhoneNumber, model.PhoneNumber.Value); Assert.AreEqual(expectedRawId, model.RawId); }
public void SerializeUnknown() { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new UnknownIdentifier("some id")); Assert.AreEqual(CommunicationIdentifierKind.Unknown, model.Kind); Assert.AreEqual("some id", model.Id); }
public void SerializeCommunicationUser() { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new CommunicationUserIdentifier("some id")); Assert.AreEqual(CommunicationIdentifierKind.CommunicationUser, model.Kind); Assert.AreEqual("some id", model.Id); }
public void SerializeMicrosoftTeamsUser(bool isAnonymous, string?expectedRawId) { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new MicrosoftTeamsUserIdentifier(TestTeamsUserId, isAnonymous, CommunicationCloudEnvironment.Dod, expectedRawId)); Assert.AreEqual(TestTeamsUserId, model.MicrosoftTeamsUser.UserId); Assert.AreEqual(CommunicationCloudEnvironmentModel.Dod, model.MicrosoftTeamsUser.Cloud); Assert.AreEqual(isAnonymous, model.MicrosoftTeamsUser.IsAnonymous); Assert.AreEqual(expectedRawId, model.RawId); }
public void SerializeUnknown() { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new UnknownIdentifier(TestRawId)); Assert.AreEqual(TestRawId, model.RawId); }
public void SerializeCommunicationUser() { CommunicationIdentifierModel model = CommunicationIdentifierSerializer.Serialize(new CommunicationUserIdentifier(TestUserId)); Assert.AreEqual(TestUserId, model.CommunicationUser.Id); }