< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1using NUnit.Framework;
 2using UnityEngine;
 3
 4namespace Tests.BuildModeHUDViews
 5{
 6    public class DragAndDropSceneObjectViewShould
 7    {
 8        private DragAndDropSceneObjectView dragAndDropSceneObjectView;
 9
 10        [SetUp]
 211        public void SetUp() { dragAndDropSceneObjectView = DragAndDropSceneObjectView.Create(); }
 12
 13        [TearDown]
 214        public void TearDown() { Object.Destroy(dragAndDropSceneObjectView.gameObject); }
 15
 16        [Test]
 17        public void DropCorrectly()
 18        {
 19            // Arrange
 120            bool isDropped = false;
 221            dragAndDropSceneObjectView.OnDrop += () => isDropped = true;
 22
 23            // Act
 124            dragAndDropSceneObjectView.Drop();
 25
 26            // Assert
 127            Assert.IsTrue(isDropped, "isDropped is false!");
 128        }
 29    }
 30}

Methods/Properties

SetUp()
TearDown()
DropCorrectly()