< Summary

Class:DCL.PluginGroup
Assembly:PluginSystem
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/PluginSystem/PluginGroup.cs
Covered lines:8
Uncovered lines:2
Coverable lines:10
Total lines:33
Line coverage:80% (8 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PluginGroup()0%110100%
Add(...)0%2.062075%
Remove(...)0%2.062075%
ContainsKey(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/PluginSystem/PluginGroup.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3
 4namespace DCL
 5{
 6    public class PluginGroup
 7    {
 128        public Dictionary<Type, PluginInfo> plugins = new Dictionary<Type, PluginInfo>();
 9
 10        public bool Add(Type type, PluginInfo pluginInfo)
 11        {
 1912            if ( plugins.ContainsKey(type) )
 013                return false;
 14
 1915            plugins.Add(type, pluginInfo);
 1916            return true;
 17        }
 18
 19        public bool Remove(Type type)
 20        {
 121            if ( !plugins.ContainsKey(type))
 022                return false;
 23
 124            plugins.Remove(type);
 125            return true;
 26        }
 27
 28        public bool ContainsKey(Type type)
 29        {
 1130            return plugins.ContainsKey(type);
 31        }
 32    }
 33}