Example #1
0
        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);
        }
    }
Example #2
0
 public SimpleProjectTest(SimpleProject project)
 {
     _project = project;
 }