< Summary

Class:InternalTexturizableHandler
Assembly:ECS7Plugin.InternalECSComponents
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/InternalECSComponents/Handlers/InternalTexturizableHandler.cs
Covered lines:7
Uncovered lines:1
Coverable lines:8
Total lines:27
Line coverage:87.5% (7 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
InternalTexturizableHandler(...)0%110100%
OnComponentCreated(...)0%110100%
OnComponentRemoved(...)0%2100%
OnComponentModelUpdated(...)0%220100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/InternalECSComponents/Handlers/InternalTexturizableHandler.cs

#LineLine coverage
 1using System;
 2using DCL.Controllers;
 3using DCL.ECS7.InternalComponents;
 4using DCL.ECSRuntime;
 5using DCL.Models;
 6
 7public class InternalTexturizableHandler : IECSComponentHandler<InternalTexturizable>
 8{
 9    private readonly IInternalECSComponent<InternalTexturizable> thisComponent;
 10
 711    public InternalTexturizableHandler(Func<IInternalECSComponent<InternalTexturizable>> componentGet)
 12    {
 713        this.thisComponent = componentGet();
 714    }
 15
 516    public void OnComponentCreated(IParcelScene scene, IDCLEntity entity) { }
 17
 018    public void OnComponentRemoved(IParcelScene scene, IDCLEntity entity) { }
 19
 20    public void OnComponentModelUpdated(IParcelScene scene, IDCLEntity entity, InternalTexturizable model)
 21    {
 1322        if (model.renderers.Count == 0)
 23        {
 124            thisComponent.RemoveFor(scene, entity);
 25        }
 1326    }
 27}