public void TestDeformationCrackJointDataSerializer() { DACTaskResult r = new DACTaskResult(); var s1 = NewSensor(ProtocolType.LVDT_XW, SafetyFactor.DeformationCrackJoint); var d = new LVDTData(10, 5) { ////AcqTime = DateTime.Now, //ResultCode = 0, //Sensor = s1 }; r.AddSensorResult(new SensorAcqResult { Data = d, Sensor = s1 }); int savedCnt = sqLiteDbAccessor.SaveDacResult(r); Assert.AreEqual(1, savedCnt); }
public void TestDeformationCrackJointDataSerializer() { DACTaskResult r = new DACTaskResult(); var s1 = NewSensor(ProtocolType.LVDT_XW, SafetyFactor.DeformationCrackJoint); s1.FactorTypeTable = "T_THEMES_DEFORMATION_CRACK"; var d = new LVDTData(10, 5) { //AcqTime = DateTime.Now, //ResultCode = 0, //Sensor = s1 }; r.AddSensorResult(new SensorAcqResult { ErrorCode = (int)Errors.SUCCESS, Data = d, Sensor = s1 }); r.Finished = DateTime.Now; int savedCnt = msDbAccessor.SaveDacResult(r); Assert.AreEqual(1, savedCnt); }