Tanoda
HandFactoryTest.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using System;
10using NUnit.Framework;
11
12namespace Leap.Unity.Tests {
13
14 [TestFixture(Category = "TestHandFactory")]
16 protected override Frame createFrame() {
17 return TestHandFactory.MakeTestFrame(0, true, true);
18 }
19
20 [Test]
21 public void CorrectHandCount() {
22 Assert.That(_frame.Hands.Count, Is.EqualTo(2));
23 }
24 }
25
26 [TestFixture(Category = "TestHandFactory")]
28 protected override Frame createFrame() {
29 return TestHandFactory.MakeTestFrame(0, true, false);
30 }
31
32 [Test]
33 public void CorrectHandCount() {
34 Assert.That(_frame.Hands.Count, Is.EqualTo(1));
35 }
36 }
37
38 [TestFixture(Category = "TestHandFactory")]
40 protected override Frame createFrame() {
41 return TestHandFactory.MakeTestFrame(0, false, true);
42 }
43
44 [Test]
45 public void CorrectHandCount() {
46 Assert.That(_frame.Hands.Count, Is.EqualTo(1));
47 }
48 }
49}
The Frame class represents a set of hand and finger tracking data detected in a single frame.
Definition: Frame.cs:24
List< Hand > Hands
The list of Hand objects detected in this frame, given in arbitrary order. The list can be empty if n...
Definition: Frame.cs:156