Beispiel #1
0
        public ListTodosTests()
        {
            _outputMock = new Mock <IListTodosOutputPort>();
            Action <ListTodosOutput> onReceivedOutput = o => { _output = o; };

            _outputMock.Setup(o => o.Default(It.IsAny <ListTodosOutput>())).Callback(onReceivedOutput);
            _context       = new ToDoContext();
            _repository    = new TodoRepository(_context);
            _useCase       = new ListTodosUseCase(_repository, _outputMock.Object);
            _entityFactory = new EntityFactory();
        }
 public ListTodosController(IListTodosUseCase useCase, ListTodosPresenter presenter)
 {
     _useCase   = useCase;
     _presenter = presenter;
 }