コード例 #1
0
        public void WithId()
        {
            _commandWithId.Validate();


            Assert.AreEqual(_commandWithId.Valid, true);
        }
コード例 #2
0
        public async Task <ICommandResult> HandleAsync(RepproveClientCommand command)
        {
            command.Validate();
            if (command.Invalid)
            {
                return(new GenericCommandResult <ClientEntity>(false, command.Notifications));
            }

            var client = await _repository.GetAsync(command.Id);

            client.SetRepproved();
            await _repository.UpdateAsync(client);

            return(new GenericCommandResult <ClientEntity>(true, client));
        }
コード例 #3
0
 public void WithoutId()
 {
     _commandWithoutId.Validate();
     Assert.AreEqual(_commandWithoutId.Valid, false);
 }