public void TestCalibrationProcessHandler() { try { try { ActivateServer(); CalibrationProcessHandler handler = new CalibrationProcessHandler(); List <Point2D> calibPoints = CalibUtils.InitCalibrationPoints(3, 3, 1980, 1200, 30, 30, true); Assert.IsTrue(GazeManager.Instance.CalibrationStart(9, handler)); Thread.Sleep(500); foreach (Point2D p in calibPoints) { GazeManager.Instance.CalibrationPointStart((int)p.X, (int)p.Y); Thread.Sleep(500); GazeManager.Instance.CalibrationPointEnd(); Thread.Sleep(1000); } Thread.Sleep(2000); Assert.IsTrue(handler.startWasCalled); Assert.IsTrue(handler.progressWasCalled); Assert.IsTrue(handler.processingWasCalled); Assert.IsTrue(handler.resultWasCalled); Assert.IsNotNull(handler.result); } catch (Exception e) { Console.WriteLine("Exception testing calibration: " + e.Message); } } finally { DeactivateServer(); } }