示例#1
0
        public void GetLinkmansByNameTest()
        {
            Contact testContact = CreateTestContact();

            _IContactDA.AddLinkman(testContact.SysNo, testContact.UserId, 0, testContact.Linkmans[0]);

            _LinkMan.Add(testContact.Linkmans[0].Id);

            Guid testLinkmanId = testContact.Linkmans[0].Id;

            Contact getContact = _IContactDA.GetLinkmansByName(testContact.SysNo, testContact.UserId, testContact.Linkmans[0].Name, 0, false);

            Assert.AreEqual(1, getContact.Linkmans.Count);
            Assert.AreEqual(testContact.Linkmans[0].Id, getContact.GetLinkmanById(testLinkmanId).Id);
            Assert.AreEqual(testContact.Linkmans[0].Name, getContact.GetLinkmanById(testLinkmanId).Name);
        }
示例#2
0
 public Contact LoadSomeContactByName(string sysNo, int userId, int companyId, string name, bool isExternal)
 {
     return(_IContactDA.GetLinkmansByName(sysNo, userId, name, companyId, isExternal));
 }