Example #1
0
        public ListEventsTests()
        {
            _outputMock = new Mock <IListEventsOutputPort>();
            Action <ListEventsOutput> onReceivedOutput = o => { _output = o; };

            _outputMock.Setup(o => o.Default(It.IsAny <ListEventsOutput>())).Callback(onReceivedOutput);
            _context       = new ToDoContext();
            _repository    = new EventRepository(_context);
            _useCase       = new ListEventsUseCase(_repository, _outputMock.Object);
            _entityFactory = new EntityFactory();
        }
 public ListEventsController(IListEventsUseCase useCase, ListEventsPresenter presenter)
 {
     _useCase   = useCase;
     _presenter = presenter;
 }