public async Task <SimpleProject> GetProjectAsync(IGetProject command) { var project = await _projectRepository.GetProjectAsync(command.Instance, command.ProjectId).ConfigureAwait(false); if (project == null) { throw new KotoriProjectException(command.ProjectId, "Project not found.") { StatusCode = System.Net.HttpStatusCode.NotFound } } ; var simpleProject = new SimpleProject(project.Name, new Uri(project.Identifier).ToKotoriProjectIdentifier()); return(simpleProject); } }
public SimpleProjectTest(SimpleProject project) { _project = project; }