Example #1
0
        public void TestCreationFromRaw()
        {
            var rawCalibration = ReadRawCalibrationFromResources();

            foreach (var depthMode in DepthModes.All)
            {
                foreach (var colorResolution in ColorResolutions.All)
                {
                    if (depthMode == DepthMode.Off && colorResolution == ColorResolution.Off)
                    {
                        continue;
                    }

                    Calibration.CreateFromRaw(rawCalibration, depthMode, colorResolution, out var calibration);

                    Assert.IsTrue(calibration.IsValid);

                    Assert.AreEqual(depthMode, calibration.DepthMode);
                    Assert.AreEqual(colorResolution, calibration.ColorResolution);
                }
            }
        }