public void SaveLinkmanTest() { Contact testContact = CreateTestContact(); contactServices.SaveLinkman(testContact.SysNo, testContact.UserId, testContact.Linkmans[0]); Guid testLinkmanId = testContact.Linkmans[0].Id; Guid testDetailId = testContact.Linkmans[0].Details[0].Id; _LinkMans.Add(testContact.Linkmans[0]); Contact getContat = contactServices.LoadAllContact(testContact.SysNo, testContact.UserId, true); Assert.AreEqual(1, getContat.Linkmans.Count); Assert.AreEqual(2, getContat.GetLinkmanById(testLinkmanId).Details.Count); Assert.AreEqual(testContact.Linkmans[0].Id, getContat.GetLinkmanById(testLinkmanId).Id); Assert.AreEqual("linkman1", getContat.GetLinkmanById(testLinkmanId).Name); Assert.AreEqual(InfoType.Num_General, getContat.GetLinkmanById(testLinkmanId).GetLinkmanDetailById(testDetailId).Type); Assert.AreEqual("123456", getContat.GetLinkmanById(testLinkmanId).GetLinkmanDetailById(testDetailId).Value); }