< Summary

Information
Class: Syki.Front.Features.Cross.SkipUserRegister.SkipUserRegisterClient
Assembly: Front
File(s): /home/runner/work/syki/syki/Front/Features/Cross/SkipUserRegister/SkipUserRegisterClient.cs
Tag: 22_11348620282
Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 19
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
.ctor(...)100%210%
Skip()100%210%

File(s)

/home/runner/work/syki/syki/Front/Features/Cross/SkipUserRegister/SkipUserRegisterClient.cs

#LineLine coverage
 1using Microsoft.JSInterop;
 2
 3namespace Syki.Front.Features.Cross.SkipUserRegister;
 4
 05public class SkipUserRegisterClient(HttpClient http, ILocalStorageService localStorage, SykiAuthStateProvider authStateP
 6{
 7    public async Task Skip()
 8    {
 09        var id = await localStorage.GetItemAsync("UserId");
 010        _ = Guid.TryParse(id, out Guid userId);
 11
 012        var response = await http.PostAsJsonAsync("/skip-user-register", new SkipUserRegisterLoginIn { UserId = userId  
 013        var result = (await response.Resolve<SkipUserRegisterLoginOut>()).GetSuccess();
 14
 015        await localStorage.SetItemAsync("AccessToken", result.AccessToken);
 016        await localStorage.SetItemAsync("UserId", result.UserId.ToString());
 017        authStateProvider.MarkUserAsAuthenticated();
 018    }
 19}