Beispiel #1
0
        private static async Task <IEnumerable <DNNDataClassesDataContext.UserEmail> > GetEmailAsync(DateTime startDate)
        {
            Task <IEnumerable <DNNDataClassesDataContext.UserEmail> > _emails = DNNDataClassesDataContext.GetEmailAsync(startDate);

            while (!_emails.IsCompleted)
            {
                Thread.Sleep(1000);
                Console.Write(".");
            }
            return(await _emails);
        }
        public void GetEmailAsyncTestMethod()
        {
            IEnumerable <DNNDataClassesDataContext.UserEmail> _listOfUsers = DNNDataClassesDataContext.GetEmailAsync(DateTime.Now - TimeSpan.FromDays(40)).Result;

            Assert.IsTrue(_listOfUsers.Count() > 0);
        }