예제 #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);
 }