示例#1
0
 public IEnumerable <TodoItem> GetAllDone(string user)
 {
     return(_context.Todos
            .AsNoTracking()
            .Where(TodoQueries.GetAllDone(user))
            .OrderBy(x => x.Date));
 }
示例#2
0
        public void GetAllDone()
        {
            _items[0].MarkAsDone();
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("*****@*****.**"));

            Assert.AreEqual(1, result.Count());
        }
示例#3
0
        public void DeveRetornarTarefasApenasDoUsuarioInformadoQueEstejamConcluidas()
        {
            _items.FirstOrDefault().MarkAsDone();
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("Usuario1"));

            Assert.AreEqual(1, result.Count());
        }
 public IEnumerable <TodoItem> GetAllDone(string email)
 {
     return(_context.Todos
            .AsNoTracking()
            .Where(TodoQueries.GetAllDone(email))
            .OrderBy(t => t.Date));
 }
示例#5
0
 public async Task <IEnumerable <TodoItem> > GetAllDoneAsync(string user)
 {
     return(await _context.Todos
            .AsNoTracking()
            .Where(TodoQueries.GetAllDone(user))
            .OrderBy(x => x.Date)
            .ToListAsync());
 }
示例#6
0
        public IEnumerable <TodoItem> GetAllDone(string user)
        {
            var result = _context.Tarefas
                         .AsNoTracking()
                         .Where(TodoQueries.GetAllDone(user))
                         .OrderBy(x => x.Date);

            return(result);
        }
 public IEnumerable <TodoItem> GetAllDone(string refUser)
 {
     return(_items.AsQueryable().Where(TodoQueries.GetAllDone(refUser)).OrderBy(x => x.Date));
 }
示例#8
0
        public void When_execute_query_should_return_only_user_done_tasks()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("UserTest3"));

            Assert.AreEqual(0, result.Count());
        }
示例#9
0
        public void Dada_consulta_retornar_tarefas_feitas_do_usuario()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("mightyfool"));

            Assert.AreEqual(0, result.Count());
        }
示例#10
0
        public void Should_return_only_todo_done_of_willian()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("willian"));

            Assert.AreEqual(0, result.Count());
        }
示例#11
0
        public void Dada_consulta_deve_retornar_tarefas_concluidas()
        {
            var result = _itens.AsQueryable().Where(TodoQueries.GetAllDone("Carlos Soares"));

            Assert.AreEqual(0, result.Count());
        }
示例#12
0
        public void Todas_tarefas_concluidas_do_usuario()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("arthur.reis"));

            Assert.AreEqual(1, result.Count());
        }
示例#13
0
 public IList <TodoItem> GetAllDone(string user)
 {
     return(_dbSet.AsNoTracking()
            .Where(TodoQueries.GetAllDone(user)).OrderBy(x => x.Date).ToList());
 }
示例#14
0
        public void Dada_a_consulta_deve_retonar_apenas_tarefas_completas_do_usuario_felipemachado()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("felipemachado"));

            Assert.True(result.Count() == 1);
        }
示例#15
0
        public void Dada_a_consulta_deve_retornar_tarefas_marcadas_como_concluidas_do_usuario_Tales_Boalim()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("Tales Boalim"));

            Assert.AreEqual(2, result.Count());
        }
示例#16
0
        public void Deve_retornar_tarefas_prontas_apenas_do_usuario_patriciamatta()
        {
            var result = _items.AsQueryable().Where(TodoQueries.GetAllDone("patriciamatta"));

            Assert.AreEqual(0, result.Count());
        }