< Summary - pva.SuperV

Information
Class: pva.SuperV.Api.Routes.Projects.GetTopicNames
Assembly: pva.SuperV.Api
File(s): /home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Api/Routes/Projects/GetTopicNames.cs
Tag: dotnet-ubuntu_22190969454
Line coverage
35%
Covered lines: 5
Uncovered lines: 9
Coverable lines: 14
Total lines: 30
Line coverage: 35.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Handle()100%1135.71%

File(s)

/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Api/Routes/Projects/GetTopicNames.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Http.HttpResults;
 2using pva.SuperV.Engine.Exceptions;
 3using pva.SuperV.Model.Services;
 4
 5namespace pva.SuperV.Api.Routes.Projects
 6{
 7    internal static class GetTopicNames
 8    {
 9        internal static async Task<Results<Ok<HashSet<string>>, NotFound<string>, BadRequest<string>, InternalServerErro
 110        {
 11            try
 112            {
 113                HashSet<string> topicNames = await projectService.GetProjectTopicNames(projectId);
 114                return TypedResults.Ok(topicNames);
 15            }
 016            catch (UnknownEntityException e)
 017            {
 018                return TypedResults.NotFound<string>(e.Message);
 19            }
 020            catch (ProjectBuildException e)
 021            {
 022                return TypedResults.InternalServerError<string>(e.Message);
 23            }
 024            catch (SuperVException e)
 025            {
 026                return TypedResults.BadRequest(e.Message);
 27            }
 128        }
 29    }
 30}

Methods/Properties

Handle()