Exemple #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);
        }
 internal static void Login(string fullname, string password)
 {
     try
     {
         SelectedPerson = PersonList.First(x => x.Fullname == fullname && x.Password == password);
     }
     catch (Exception)
     {
     }
 }
 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);
     }
 }