public void TestTrackingLeftHandClose()
        {
            var initial = new KinectBody[]
            {
                FakeBodies.BodyWithLeftHandState(128, TrackingConfidence.High, HandState.Open)
            };

            var next = new KinectBody[]
            {
                FakeBodies.BodyWithLeftHandState(128, TrackingConfidence.High, HandState.Closed)
            };

            bool pass = false;

            HandStateTrackingProcessor processor = new HandStateTrackingProcessor();

            processor.Next(initial);
            processor.HandStateChanged += (sender, args) => pass = args.Body == next[0] && args.HandType == HandType.Left && args.PreviousHandState == HandState.Open;
            processor.Next(next);
            Assert.AreEqual(pass, true);
        }
        public void TestTrackingLeftHandNoChange()
        {
            var initial = new KinectBody[]
            {
                FakeBodies.BodyWithLeftHandState(128, TrackingConfidence.High, HandState.Open)
            };

            var next = new KinectBody[]
            {
                FakeBodies.BodyWithLeftHandState(128, TrackingConfidence.High, HandState.Open)
            };

            bool pass = true;

            HandStateTrackingProcessor processor = new HandStateTrackingProcessor();

            processor.Next(initial);
            processor.HandStateChanged += (sender, args) => pass = false;
            processor.Next(next);

            Assert.AreEqual(pass, true);
        }
        public void NewBodyDontRaiseEvent()
        {
            var initial = new KinectBody[]
            {
                FakeBodies.BodyWithRightHandState(128, TrackingConfidence.High, HandState.Open)
            };

            var next = new KinectBody[]
            {
                FakeBodies.BodyWithRightHandState(142, TrackingConfidence.High, HandState.Closed)
            };

            bool pass = true;

            HandStateTrackingProcessor processor = new HandStateTrackingProcessor();

            processor.Next(initial);
            processor.HandStateChanged += (sender, args) => pass = false;
            processor.Next(next);

            Assert.AreEqual(pass, true);
        }