public async Task GivenIdNotExist_WhenGetWithId_ThenReturnsNotFound()
        {
            using (var context = new TodoContext(_contextOptions))
            {
                TodoItemsController controller = new TodoItemsController(context);
                var invalidId = context.TodoItems.Count() + 1;

                var findResult = await controller.GetTodoItem(invalidId);

                Assert.AreEqual(typeof(NotFoundResult), findResult.Result.GetType());
            }
        }
        public async Task GivenTodoItemsExists_WhenGetWithId_ThenReturnsExactResult()
        {
            using (var context = new TodoContext(_contextOptions))
            {
                TodoItemsController controller = new TodoItemsController(context);
                int id       = GetRandomId(context);
                var expected = await context.TodoItems.FirstOrDefaultAsync(t => t.Id == id);

                var findResult = await controller.GetTodoItem(id);

                Assert.AreEqual(new TodoItemDTO(expected), findResult.Value);
            }
        }