示例#1
0
        public void Default(RemoveEventOutput output)
        {
            var response = new RemoveEventResponse
            {
                Id = output.EventId
            };

            ViewModel = new OkObjectResult(response);
        }
示例#2
0
        public RemoveEventTests()
        {
            _outputMock = new Mock <IRemoveEventOutputPort>();
            Action <RemoveEventOutput> onReceivedOutput = o => { _output = o; };

            _outputMock.Setup(o => o.Default(It.IsAny <RemoveEventOutput>())).Callback(onReceivedOutput);

            _entityFactory = new EntityFactory();
            _context       = new ToDoContext();
            _repository    = new EventRepository(_context);

            _useCase = new RemoveEventUseCase(_outputMock.Object, _repository);
        }