< Summary

Class:Tests.HelpAndSupportHUDControllerShould
Assembly:HelpAndSupportHUDTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/HelpAndSupportHUD/Test/HelpAndSupportHUDControllerShould.cs
Covered lines:17
Uncovered lines:0
Coverable lines:17
Total lines:50
Line coverage:100% (17 of 17)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetUp()0%330100%
TearDown()0%330100%
CreateViewProperly()0%110100%
ShowViewProperly()0%110100%
HideViewProperly()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/HelpAndSupportHUD/Test/HelpAndSupportHUDControllerShould.cs

#LineLine coverage
 1using NUnit.Framework;
 2using UnityEngine.TestTools;
 3using DCL.HelpAndSupportHUD;
 4using System.Collections;
 5
 6namespace Tests
 7{
 8    public class HelpAndSupportHUDControllerShould : IntegrationTestSuite_Legacy
 9    {
 10        private HelpAndSupportHUDController controller;
 11
 12        [UnitySetUp]
 13        protected override IEnumerator SetUp()
 14        {
 315            yield return base.SetUp();
 16
 317            controller = new HelpAndSupportHUDController();
 318        }
 19
 20        [UnityTearDown]
 21        protected override IEnumerator TearDown()
 22        {
 323            controller.Dispose();
 324            yield return base.TearDown();
 325        }
 26
 27        [Test]
 28        public void CreateViewProperly()
 29        {
 130            Assert.NotNull(controller.view);
 131            Assert.NotNull(controller.view.gameObject);
 132        }
 33
 34        [Test]
 35        public void ShowViewProperly()
 36        {
 137            controller.view.gameObject.SetActive(false);
 138            controller.SetVisibility(true);
 139            Assert.IsTrue(controller.view.isOpen);
 140        }
 41
 42        [Test]
 43        public void HideViewProperly()
 44        {
 145            controller.view.gameObject.SetActive(true);
 146            controller.SetVisibility(false);
 147            Assert.IsFalse(controller.view.isOpen);
 148        }
 49    }
 50}