< Summary - pva.SuperV

Information
Class: pva.SuperV.Api.Routes.FieldDefinitions.SearchFieldDefinitions
Assembly: pva.SuperV.Api
File(s): /home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Api/Routes/FieldDefinitions/SearchFieldDefinitions.cs
Tag: dotnet-ubuntu_18869653307
Line coverage
40%
Covered lines: 4
Uncovered lines: 6
Coverable lines: 10
Total lines: 28
Line coverage: 40%
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%1140%

File(s)

/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Api/Routes/FieldDefinitions/SearchFieldDefinitions.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Http.HttpResults;
 2using pva.SuperV.Engine.Exceptions;
 3using pva.SuperV.Model;
 4using pva.SuperV.Model.FieldDefinitions;
 5using pva.SuperV.Model.Services;
 6
 7namespace pva.SuperV.Api.Routes.FieldDefinitions
 8{
 9    internal static class SearchFieldDefinitions
 10    {
 11        internal static async Task<Results<Ok<PagedSearchResult<FieldDefinitionModel>>, NotFound<string>, BadRequest<str
 12            Handle(IFieldDefinitionService fieldDefinitionService, string projectId, string className, FieldDefinitionPa
 113        {
 14            try
 115            {
 116                return TypedResults.Ok(await fieldDefinitionService.SearchFieldsAsync(projectId, className, search));
 17            }
 018            catch (UnknownEntityException e)
 019            {
 020                return TypedResults.NotFound(e.Message);
 21            }
 022            catch (SuperVException e)
 023            {
 024                return TypedResults.BadRequest(e.Message);
 25            }
 126        }
 27    }
 28}

Methods/Properties

Handle()