-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1083 from eluchsinger/master
Added UnitTests for WorldAnchor.
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
Assets/HoloToolkit-UnitTests/Editor/Utilities/WorldAnchorManagerTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using UnityEngine; | ||
using NUnit.Framework; | ||
|
||
namespace HoloToolkit.Unity.Tests | ||
{ | ||
public class WorldAnchorManagerTests | ||
{ | ||
[SetUp] | ||
public void ClearScene() | ||
{ | ||
TestUtils.ClearScene(); | ||
} | ||
|
||
[Test] | ||
public void TestGenerateAnchorNameFromGameObject() | ||
{ | ||
const string expected = "AnchorName"; | ||
var gameObject = new GameObject(expected); | ||
var result = WorldAnchorManager.GenerateAnchorName(gameObject); | ||
Assert.That(result, Is.EqualTo(expected)); | ||
} | ||
|
||
[Test] | ||
public void TestGenerateAnchorNameFromParameter() | ||
{ | ||
const string expected = "AnchorName"; | ||
var gameObject = new GameObject(); | ||
var result = WorldAnchorManager.GenerateAnchorName(gameObject, expected); | ||
Assert.That(result, Is.EqualTo(expected)); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
Assets/HoloToolkit-UnitTests/Editor/Utilities/WorldAnchorManagerTests.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters