コード例 #1
0
ファイル: ListTodosTests.cs プロジェクト: wilsonvargas/todo
        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();
        }
コード例 #2
0
 public ListTodosController(IListTodosUseCase useCase, ListTodosPresenter presenter)
 {
     _useCase   = useCase;
     _presenter = presenter;
 }