private static void CheckContacts(XmlNode ctrNode, List<Contact> contacts)
{
var jnode = ctrNode.GetXmlAttribute("J");
var knode = ctrNode.GetXmlAttribute("K");
var lnode = ctrNode.GetXmlAttribute("L");
var mnode = ctrNode.GetXmlAttribute("M");
if (!string.IsNullOrEmpty(jnode))
{
var fixedPhoneContact = contacts.Single(x => x.Type == ContactTypeEnum.FixedPhone);
Assert.AreEqual(jnode, fixedPhoneContact.Number);
}
if (!string.IsNullOrEmpty(knode))
{
var mobilePhoneContact = contacts.Single(x => x.Type == ContactTypeEnum.MobilePhone);
Assert.AreEqual(knode, mobilePhoneContact.Number);
}
if (!string.IsNullOrEmpty(lnode))
{
var faxContact = contacts.Single(x => x.Type == ContactTypeEnum.Fax);
Assert.AreEqual(lnode, faxContact.Number);
}
if (!string.IsNullOrEmpty(mnode))
{
var emailContact = contacts.Single(x => x.Type == ContactTypeEnum.Email);
Assert.AreEqual(mnode, emailContact.Number);
}
}