Exemplo n.º 1
0
        public async Task UpdateVariables(
#if NETCOREAPP
            [FromBody]
#endif
            UpdateEmailVariablesCommand command)
        {
            await _commandExecutor.ExecuteAsync(command);
        }
Exemplo n.º 2
0
        public void Context()
        {
            _email = A.Fake <Email>();

            const int emailId         = 23;
            var       emailRepository = A.Fake <IRepository <Email> >();

            A.CallTo(() => emailRepository.GetAsync(emailId)).Returns(_email);

            _emailDto = new EmailDto
            {
                EmailId = emailId,
            };
            var command = new UpdateEmailVariablesCommand
            {
                Email = _emailDto,
            };
            var handler = new UpdateEmailVariablesCommandHandler(emailRepository);

            handler.ExecuteAsync(command).Wait();
        }