< Summary

Class:DCLServices.CopyPaste.Analytics.CopyPasteAnalyticsService
Assembly:CopyPasteAnalytics
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/CopyPaste/Analytics/CopyPasteAnalyticsService.cs
Covered lines:6
Uncovered lines:2
Coverable lines:8
Total lines:30
Line coverage:75% (6 of 8)
Covered branches:0
Total branches:0
Covered methods:3
Total methods:4
Method coverage:75% (3 of 4)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CopyPasteAnalyticsService(...)0%110100%
Dispose()0%110100%
Initialize()0%110100%
Copy(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLServices/CopyPaste/Analytics/CopyPasteAnalyticsService.cs

#LineLine coverage
 1using System.Collections.Generic;
 2
 3namespace DCLServices.CopyPaste.Analytics
 4{
 5    public class CopyPasteAnalyticsService : ICopyPasteAnalyticsService
 6    {
 7        private readonly IAnalytics analytics;
 8        private readonly IUserProfileBridge userProfileBridge;
 9
 42510        public CopyPasteAnalyticsService(IAnalytics analytics,
 11            IUserProfileBridge userProfileBridge)
 12        {
 42513            this.analytics = analytics;
 42514            this.userProfileBridge = userProfileBridge;
 42515        }
 16
 42517        public void Dispose() { }
 18
 42519        public void Initialize() { }
 20
 21        public void Copy(string element)
 22        {
 023            analytics.SendAnalytic("copy_element", new Dictionary<string, string>
 24            {
 25                { "wallet_id", userProfileBridge.GetOwn().userId },
 26                { "copied_element", element },
 27            });
 028        }
 29    }
 30}