public void Converts_signer_with_pin_and_notifications_successfully() { //Arrange var source = new Signer( new PersonalIdentificationNumber("11111111111"), new Notifications(new Email("*****@*****.**")) ); var expected = new portalsigner { Item = ((PersonalIdentificationNumber)source.Identifier).Value, Item1 = new notifications { Items = new object[] { new email { address = source.Notifications.Email.Address } } }, onbehalfof = signingonbehalfof.SELF, onbehalfofSpecified = true, }; //Act var actual = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, actual, out differences); Assert.Empty(differences); }
public void Converts_signer_with_notifications_using_lookup_successfully() { //Arrange var source = new Signer( new PersonalIdentificationNumber("11111111111"), new NotificationsUsingLookup() ); var expected = new portalsigner { Item = ((PersonalIdentificationNumber)source.Identifier).Value, Item1 = new notificationsusinglookup { email = new enabled() }, onbehalfof = signingonbehalfof.SELF, onbehalfofSpecified = true, }; //Act var actual = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, actual, out differences); Assert.Empty(differences); }
public void Converts_signer_identified_by_sms() { //Arrange var source = new Signer( new ContactInformation { Sms = new Sms("11111111") } ); var expected = new portalsigner { Item = new enabled(), Item1 = new notifications { Items = new object[] { new sms { number = "11111111" } } }, onbehalfof = signingonbehalfof.SELF, onbehalfofSpecified = true, }; //Act var actual = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, actual, out differences); Assert.Empty(differences); }
public void Converts_signer_with_contact_information_identifier() { //Arrange var source = new Signer(new ContactInformation { Email = new Email("*****@*****.**") }); var expected = new portalsigner { Item = new enabled(), Item1 = new notifications { Items = new object[] { new email { address = ((ContactInformation)source.Identifier).Email.Address } } }, onbehalfof = signingonbehalfof.SELF, onbehalfofSpecified = true, }; //Act var actual = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, actual, out differences); Assert.Empty(differences); }
public void Converts_on_behalf_of() { //Arrange var source = new Signer( new ContactInformation { Email = new Email("*****@*****.**") } ) { OnBehalfOf = OnBehalfOf.Other }; var expected = new portalsigner { Item = new enabled(), Item1 = new notifications { Items = new object[] { new email { address = "*****@*****.**" } } }, onbehalfofSpecified = true, onbehalfof = signingonbehalfof.OTHER }; //Act var actual = DataTransferObjectConverter.ToDataTransferObject(source); //Assert var comparator = new Comparator(); IEnumerable <IDifference> differences; comparator.AreEqual(expected, actual, out differences); Assert.Empty(differences); }