public void WithId() { _commandWithId.Validate(); Assert.AreEqual(_commandWithId.Valid, true); }
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)); }
public void WithoutId() { _commandWithoutId.Validate(); Assert.AreEqual(_commandWithoutId.Valid, false); }