< Summary

Class:Tests.TextShapeHelperTests
Assembly:TextShapeTests
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/TextShape/Tests/TextShapeHelperTests.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:23
Line coverage:100% (10 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TestTextAlignment()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/TextShape/Tests/TextShapeHelperTests.cs

#LineLine coverage
 1using DCL.Components;
 2using NUnit.Framework;
 3using TMPro;
 4
 5namespace Tests
 6{
 7    public class TextShapeHelperTests
 8    {
 9        [Test]
 10        public void TestTextAlignment()
 11        {
 112            Assert.AreEqual(TextAlignmentOptions.BottomLeft, TextShape.GetAlignment("bottom", "left"));
 113            Assert.AreEqual(TextAlignmentOptions.BottomRight, TextShape.GetAlignment("Bottom", "RIght"));
 114            Assert.AreEqual(TextAlignmentOptions.Center, TextShape.GetAlignment("Center", "center"));
 115            Assert.AreEqual(TextAlignmentOptions.TopLeft, TextShape.GetAlignment("top", "Left"));
 116            Assert.AreEqual(TextAlignmentOptions.TopRight, TextShape.GetAlignment("top", "right"));
 117            Assert.AreEqual(TextAlignmentOptions.Top, TextShape.GetAlignment("top", "center"));
 118            Assert.AreEqual(TextAlignmentOptions.Right, TextShape.GetAlignment("center", "right"));
 119            Assert.AreEqual(TextAlignmentOptions.Bottom, TextShape.GetAlignment("Bottom", "cEnter"));
 120            Assert.AreEqual(TextAlignmentOptions.Left, TextShape.GetAlignment("center", "left"));
 121        }
 22    }
 23}

Methods/Properties

TestTextAlignment()