public void ShouldRequireValidProjectId() { var command = new RemoveProjectParticipantCommand { ProjectId = 99, ParticipantEmail = "test@local" }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <NotFoundException>(); }
public async Task <ActionResult> RemoveParticipant(int id, RemoveProjectParticipantCommand command) { if (id != command.ProjectId) { return(BadRequest()); } await Mediator.Send(command); return(NoContent()); }