< Summary

Class:SceneBoundarieCheckerFeedbackStyleShould
Assembly:SceneBoundariesCheckerTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/SceneBoundariesController/Tests/SceneBoundarieCheckerFeedbackStyleShould.cs
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:55
Line coverage:100% (9 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CreatePlatformContext()0%110100%
CreateRuntimeContext()0%110100%
ChangeFeedbackStyleChange()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/SceneBoundariesController/Tests/SceneBoundarieCheckerFeedbackStyleShould.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using DCL;
 4using DCL.Components;
 5using DCL.Controllers;
 6using DCL.Helpers;
 7using Newtonsoft.Json;
 8using NUnit.Framework;
 9using Tests;
 10using UnityEngine;
 11using UnityEngine.TestTools;
 12
 13public class SceneBoundarieCheckerFeedbackStyleShould : IntegrationTestSuite
 14{
 15    protected override PlatformContext CreatePlatformContext()
 16    {
 117        WebRequestController webRequestController = new WebRequestController();
 118        webRequestController.Initialize(
 19            genericWebRequest: new WebRequest(),
 20            assetBundleWebRequest: new WebRequestAssetBundle(),
 21            textureWebRequest: new WebRequestTexture(),
 22            null);
 23
 124        var context = DCL.Tests.PlatformContextFactory.CreateWithCustomMocks
 25        (
 26            webRequestController: webRequestController
 27        );
 28
 129        return context;
 30    }
 31
 32    protected override WorldRuntimeContext CreateRuntimeContext()
 33    {
 134        return DCL.Tests.WorldRuntimeContextFactory.CreateWithCustomMocks
 35        (
 36            sceneController: new SceneController(),
 37            state: new WorldState(),
 38            componentFactory: new RuntimeComponentFactory(),
 39            sceneBoundsChecker: new SceneBoundsChecker(new SceneBoundsFeedbackStyle_Simple())
 40        );
 41    }
 42
 43    [Test]
 44    public void ChangeFeedbackStyleChange()
 45    {
 46        //Arrange
 147        var redFlickerStyle = new SceneBoundsFeedbackStyle_RedFlicker();
 48
 49        //Act
 150        Environment.i.world.sceneBoundsChecker.SetFeedbackStyle(redFlickerStyle);
 51
 52        //Assert
 153        Assert.AreSame( Environment.i.world.sceneBoundsChecker.GetFeedbackStyle(), redFlickerStyle );
 154    }
 55}