{
//Arrange
var catCategoria = new Categoria("catiguria");
var tarefas = new List<Tarefa>
{
//atrasadas a partir de 1/1/2019
new Tarefa(1, "Tirar lixo", catCategoria, new DateTime(2018,12,31), null, StatusTarefa.Criada),
new Tarefa(4, "Fazer o almoço", catCategoria, new DateTime(2018,12,31), null, StatusTarefa.Criada),
new Tarefa(9, "Ir à academia", catCategoria, new DateTime(2018,12,31), null, StatusTarefa.Criada)
};
var mock = new Mock<IRepositorioTarefas>();
mock.Setup(r => r.ObtemTarefas(It.IsAny<Func<Tarefa, bool>>()))
.Returns(tarefas);
var repo = mock.Object;
var handler = new GerenciaPrazoDasTarefasHandler(repo);
var comando = new GerenciaPrazoDasTarefas(new DateTime(2019, 1, 1));
//Act
handler.Execute(comando);
//Assert
mock.Verify(r => r.AtualizarTarefas(It.IsAny<Tarefa[]>()), Times.Once());
}