public void NotEmptyGoalsList()
        {
            TestContext.WriteLine("Consulta na lsita de Objetivos");
            var goals = GoalsRepository.List();

            TestContext.WriteLine($"Tamanho da lista de Objetivos:{goals.Count}");
            CollectionAssert.AllItemsAreNotNull(goals);
        }
예제 #2
0
        //Get
        public IEnumerable <GoalDTO> ListGoals(string username)
        {
            var goals = (from g in _repo.List()
                         where g.AppUser.UserName == username
                         select new GoalDTO
            {
                Id = g.Id,
                Name = g.Name,
                Amount = g.Amount,
                EndDate = g.EndDate,
                Current = g.Current
            }).ToList();

            return(goals);
        }