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())));
                frameDataSource.Push();

                assertions(src.CurrentValue);
            }
        }
        public void Saved_Frame_Can_Be_Restored()
        {
            var repository = new DepthDataFrameRepository(new IntSize(20, 10));
            var frame = new DepthDataFrame(20, 10);
            int anIndex = 1;
            ushort aValue = 2;

            frame.Data[anIndex] = aValue;
            var path = Path.GetTempFileName();
            repository.Save(frame, path);
            
            var loadedFrame = repository.Load(path);
            File.Delete(path);

            Assert.AreEqual(aValue, loadedFrame.Data[anIndex]);
        }