< Summary

Class:Tests.BuildModeHUDControllers.SaveHUDControllerShould
Assembly:BuildModeHUDTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuildModeHUD/Tests/SaveHUDControllerShould.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:43
Line coverage:100% (10 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SetUp()0%110100%
TearDown()0%110100%
SaveStartCorrectly()0%110100%
StopSaveAnimation()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuildModeHUD/Tests/SaveHUDControllerShould.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using NSubstitute;
 4using NUnit.Framework;
 5using UnityEngine;
 6
 7namespace Tests.BuildModeHUDControllers
 8{
 9    public class SaveHUDControllerShould
 10    {
 11        private SaveHUDController saveHudController;
 12
 13        [SetUp]
 14        public void SetUp()
 15        {
 216            saveHudController = new SaveHUDController();
 217            saveHudController.Initialize(Substitute.For<ISaveHUDView>());
 218        }
 19
 20        [TearDown]
 421        public void TearDown() { saveHudController.Dispose(); }
 22
 23        [Test]
 24        public void SaveStartCorrectly()
 25        {
 26            // Act
 127            saveHudController.SceneStateSave();
 28
 29            // Assert
 130            saveHudController.view.Received(1).SceneStateSaved();
 131        }
 32
 33        [Test]
 34        public void StopSaveAnimation()
 35        {
 36            // Act
 137            saveHudController.StopAnimation();
 38
 39            // Assert
 140            saveHudController.view.Received(1).StopAnimation();
 141        }
 42    }
 43}