コード例 #1
0
 /// <summary>
 /// Tests all defined length captures and tests for lag time, with sync and asyc settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestCapture_BothSyncs(MotionSensorTypes motionSensorType)
 {
     this.motionSensorType = motionSensorType;
     captures = new CaptureListTesting();
     captures.PopulateTimedCaptures();
     RunTests();
 }
コード例 #2
0
 /// <summary>
 /// Tests all defined length captures and tests for lag time, with sync and asyc settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestCapture_BothSyncs(MotionSensorTypes motionSensorType)
 {
     this.motionSensorType = motionSensorType;
     captures = new CaptureListTesting();
     captures.PopulateTimedCaptures();
     RunTests();
 }
コード例 #3
0
        protected void TestMotion(CaptureTesting captureTesting, MotionSensorTypes motionSensorType, MotionSensorSettingsTest settings)
        {
            captureId = captureTesting.captureId;

            if (motionSensorType == MotionSensorTypes.Motion2a)
            {
                using (MotionSensor2aTest test = new MotionSensor2aTest())
                {
                    test.settings = settings;

                    captureTesting.detectionStartTime    = DateTime.Now;
                    captureTesting.detectedMovmentFrames = new List <int>();
                    captureTesting.detectionMethod       = "a";

                    test.expectedFrames = captureTesting.numberFrames;
                    test.timedTest      = timedTest;
                    test.Run(captureTesting.captureId);

                    captureTesting.detectedMovmentFrames = test.movementFrames;
                    captureTesting.detectionEndTime      = DateTime.Now;

                    if (timedTest)
                    {
                        elapsedMilliseconds = test.testTimer.Elapsed.TotalMilliseconds;
                    }
                }

                WriteToDatabase(captureTesting, settings); //calls the subclass method
            }
        }
コード例 #4
0
        /// <summary>
        /// Tests all items in the captures list, against the specified motion sensor type
        /// </summary>
        /// <param name="motionSensorType"></param>
        public void TestAllCaptures(MotionSensorTypes motionSensorType)
        {
            PopulateAllCaptures();

            MotionSensorSettingsList motionSensorSettingsList = new MotionSensorSettingsList();
            motionSensorSettingsList.PopulateAllPossible();
            var settingsList = motionSensorSettingsList.list;

            foreach (MotionSensorSettingsTest setting in settingsList)
            {
                captures.list.ForEach(x => TestMotion(x, motionSensorType, setting));
            }
        }
コード例 #5
0
        /// <summary>
        /// Tests all captures in the database. Each setting is taken through its predefined range, with all captures being tested 
        /// throughout those ranges. All other settings remain at their default value
        /// </summary>
        public void TestAllCaptures_SequentialSettingChanges(MotionSensorTypes motionSensorType)
        {
            captures = new CaptureListTesting();
            captures.PopulateAllCaptures(true);

            MotionSensorSettingsList motionSensorSettingsList = new MotionSensorSettingsList();
            motionSensorSettingsList.PopulateSequentialChange();

            foreach (MotionSensorSettingsTest setting in motionSensorSettingsList.list)
            {
                captures.list.ForEach(x => TestMotion(x, motionSensorType, setting));
            }

        }
コード例 #6
0
        /// <summary>
        /// Tests all captures in the database. Each setting is taken through its predefined range, with all captures being tested
        /// throughout those ranges. All other settings remain at their default value
        /// </summary>
        public void TestAllCaptures_SequentialSettingChanges(MotionSensorTypes motionSensorType)
        {
            captures = new CaptureListTesting();
            captures.PopulateAllCaptures(true);

            MotionSensorSettingsList motionSensorSettingsList = new MotionSensorSettingsList();

            motionSensorSettingsList.PopulateSequentialChange();

            foreach (MotionSensorSettingsTest setting in motionSensorSettingsList.list)
            {
                captures.list.ForEach(x => TestMotion(x, motionSensorType, setting));
            }
        }
コード例 #7
0
        /// <summary>
        /// Tests all items in the captures list, against the specified motion sensor type
        /// </summary>
        /// <param name="motionSensorType"></param>
        public void TestAllCaptures(MotionSensorTypes motionSensorType)
        {
            PopulateAllCaptures();

            MotionSensorSettingsList motionSensorSettingsList = new MotionSensorSettingsList();

            motionSensorSettingsList.PopulateAllPossible();
            var settingsList = motionSensorSettingsList.list;

            foreach (MotionSensorSettingsTest setting in settingsList)
            {
                captures.list.ForEach(x => TestMotion(x, motionSensorType, setting));
            }
        }
コード例 #8
0
 /// <summary>
 /// Tests a specific capture for lag time, with sync and asyc settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestCapture_BothSyncs(MotionSensorTypes motionSensorType, string captureId)
 {
     this.motionSensorType = motionSensorType;
     PopulateCapture(captureId);
     RunTests();
 }
コード例 #9
0
 /// <summary>
 /// Tests all the captures for lag time, with sync and async settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestAllCaptures_BothSyncs(MotionSensorTypes motionSensorType)
 {
     this.motionSensorType = motionSensorType;
     PopulateAllCaptures();
     RunTests();
 }
コード例 #10
0
 /// <summary>
 /// Tests a specific capture for lag time, with sync and asyc settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestCapture_BothSyncs(MotionSensorTypes motionSensorType, string captureId)
 {
     this.motionSensorType = motionSensorType;
     PopulateCapture(captureId);
     RunTests();
 }
コード例 #11
0
 /// <summary>
 /// Tests all the captures for lag time, with sync and async settings
 /// </summary>
 /// <param name="motionSensorType"></param>
 public void TestAllCaptures_BothSyncs(MotionSensorTypes motionSensorType)
 {
     this.motionSensorType = motionSensorType;
     PopulateAllCaptures();
     RunTests();
 }