< Summary

Information
Class: MRA.Services.GoogleCredentialHelper
Assembly: MRA.Services
File(s): D:\a\MiguelRomerART\MiguelRomerART\MRA.Services\GoogleCredentialHelper.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 20
Line coverage: 0%
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
GetAccessTokenAsync()100%210%

File(s)

D:\a\MiguelRomerART\MiguelRomerART\MRA.Services\GoogleCredentialHelper.cs

#LineLine coverage
 1using Google.Apis.Auth.OAuth2;
 2using System;
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Text;
 6using System.Threading.Tasks;
 7
 8namespace MRA.Services
 9{
 10    public static class GoogleCredentialHelper
 11    {
 12        public static async Task<string> GetAccessTokenAsync(string serviceAccountJsonPath)
 13        {
 014            GoogleCredential credential = GoogleCredential.FromFile(serviceAccountJsonPath)
 015                .CreateScoped(new[] { "https://www.googleapis.com/auth/firebase.remoteconfig" });
 16
 017            return await credential.UnderlyingCredential.GetAccessTokenForRequestAsync();
 018        }
 19    }
 20}

Methods/Properties

GetAccessTokenAsync()