public void CatpureSettingsXml() { MotionSensorSettingsTest test = new MotionSensorSettingsTest(); test.captureId = "111"; test.sensitivity = (decimal)3.111; XmlDocument doc = test.SerialiseMe(); Assert.IsTrue(doc.OuterXml.Count() > 0); }
public void MotionSensorSettingCloning() { MotionSensorSettingsTest a = new MotionSensorSettingsTest(); a.sensitivity = 199; a.horizontalPixelsToSkip = 199; MotionSensorSettingsTest b = new MotionSensorSettingsTest(a); b.sensitivity = 22; Assert.IsTrue(a.sensitivity != b.sensitivity); Assert.IsTrue(a.horizontalPixelsToSkip == b.horizontalPixelsToSkip); }
private void RunTests() { MotionSensorSettingsTest settings = new MotionSensorSettingsTest(); timedTest = true; //sync tests settings.asynchronous = false; captures.list.ForEach(x => { TestMotion(x, motionSensorType, settings); Console.WriteLine(x.captureId + " complete"); }); //async tests //settings.asynchronous = true; //captures.list.ForEach(x => { TestMotion(x, motionSensorType, settings); }); }
public void MotionSensorSettingCloning() { MotionSensorSettingsTest a = new MotionSensorSettingsTest(); a.sensitivity = 199; a.horizontalPixelsToSkip = 199; MotionSensorSettingsTest b = new MotionSensorSettingsTest(a); b.sensitivity = 22; Assert.IsTrue(a.sensitivity != b.sensitivity); Assert.IsTrue(a.horizontalPixelsToSkip == b.horizontalPixelsToSkip); }
private void RunTests() { MotionSensorSettingsTest settings = new MotionSensorSettingsTest(); timedTest = true; //sync tests settings.asynchronous = false; captures.list.ForEach(x => { TestMotion(x, motionSensorType, settings); Console.WriteLine(x.captureId + " complete"); }); //async tests //settings.asynchronous = true; //captures.list.ForEach(x => { TestMotion(x, motionSensorType, settings); }); }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateLagTestSession(captureTest.captureId, motionSettings.asynchronous, elapsedMilliseconds); }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateLagTestSession(captureTest.captureId, motionSettings.asynchronous, elapsedMilliseconds); }
internal abstract void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings);
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 } }
public void CatpureSettingsXml() { MotionSensorSettingsTest test = new MotionSensorSettingsTest(); test.captureId = "111"; test.sensitivity = (decimal)3.111; XmlDocument doc = test.SerialiseMe(); Assert.IsTrue(doc.OuterXml.Count() > 0); }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateDetectionSession(captureTest.SerialiseMe(), motionSettings.SerialiseMe(), captureTest.captureId); }
internal override void WriteToDatabase(CaptureTesting captureTest, MotionSensorSettingsTest motionSettings) { var db = new CaptureDbTest(ConfigurationManager.ConnectionStrings["LOCALDB"].ConnectionString); db.CreateDetectionSession(captureTest.SerialiseMe(), motionSettings.SerialiseMe(), captureTest.captureId); }