CCT.NUI.Tests.HandDetectionTests.RunTest C# (CSharp) Method

RunTest() private method

private RunTest ( string framePath, Action assertions ) : void
framePath string
assertions Action
return void
        private void RunTest(string framePath, Action<HandCollection> assertions)
        {
            var frameSize = new IntSize(640, 480);
            var frame = new DepthDataFrameRepository(frameSize).Load(framePath);
            using (var frameDataSource = new DepthFramePointerDataSource(frame))
            {
                var src = new HandDataSource(new ClusterShapeDataSource(new OpenNIClusterDataSource(frameDataSource, new ClusterDataSourceSettings())), new HandDataSourceSettings { FramesForNewFingerPoint = 0 });
                src.Start();
                frameDataSource.Push();
                src.Stop();
                assertions(src.CurrentValue);
            }
        }
    }