Esempio n. 1
0
        public void Svc_AddPerson_adds_to_Db()
        {
            var service = new SearchService(_repoEmpty.Object);

            service.AddPerson(PersonList.First());
            _repoEmpty.Verify(m => m.Insert(It.IsAny <Person>()), Times.Once);
        }
Esempio n. 2
0
 internal static void Login(string fullname, string password)
 {
     try
     {
         SelectedPerson = PersonList.First(x => x.Fullname == fullname && x.Password == password);
     }
     catch (Exception)
     {
     }
 }
Esempio n. 3
0
 internal static bool AreCredentialsCorrect(string fullname, string password)
 {
     try
     {
         if (PersonList.First(x => x.Fullname == fullname && x.Password == password) != null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }