< Summary

Class:UserProfileWebInterfaceBridge
Assembly:UserProfile
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/UserProfileWebInterfaceBridge.cs
Covered lines:3
Uncovered lines:8
Coverable lines:11
Total lines:36
Line coverage:27.2% (3 of 11)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SaveUnverifiedName(...)0%2100%
SaveDescription(...)0%2100%
RequestFullUserProfile(...)0%2100%
RequestFullUserProfileAsync(...)0%2100%
GetOwn()0%110100%
AddUserProfileToCatalog(...)0%2100%
Get(...)0%2.152066.67%
GetByName(...)0%2100%
SignUp()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/UserProfile/UserProfileWebInterfaceBridge.cs

#LineLine coverage
 1using Cysharp.Threading.Tasks;
 2using DCL.Interface;
 3using System.Linq;
 4using System.Threading;
 5
 6public class UserProfileWebInterfaceBridge : IUserProfileBridge
 7{
 08    public void SaveUnverifiedName(string name) => WebInterface.SendSaveUserUnverifiedName(name);
 9
 010    public void SaveDescription(string description) => WebInterface.SendSaveUserDescription(description);
 11
 012    public void RequestFullUserProfile(string userId) => WebInterface.SendRequestUserProfile(userId);
 13
 14    public UniTask<UserProfile> RequestFullUserProfileAsync(string userId, CancellationToken cancellationToken) =>
 015        UserProfileController.i.RequestFullUserProfileAsync(userId, cancellationToken);
 16
 98917    public UserProfile GetOwn() => UserProfile.GetOwnUserProfile();
 18
 19    public void AddUserProfileToCatalog(UserProfileModel userProfileModel)
 20    {
 021        UserProfileController.i.AddUserProfileToCatalog(userProfileModel);
 022    }
 23
 24    public UserProfile Get(string userId)
 25    {
 926        if (userId == null) return null;
 927        return UserProfileController.userProfilesCatalog.Get(userId);
 28    }
 29
 30    public UserProfile GetByName(string userNameOrId)
 31    {
 032        return UserProfileController.userProfilesCatalog.GetValues().FirstOrDefault(p => p.userName == userNameOrId);
 33    }
 34
 035    public void SignUp() => WebInterface.RedirectToSignUp();
 36}