public void Test_SetValueByText_Time() { PropertyInfo property = (typeof(ZteSignal)).GetProperty("Time"); ZteSignal signal = new ZteSignal { Time = DateTime.Now }; signal.SetValueByText(property, "2014-02-08 13:15:12:900"); Assert.AreEqual(signal.Time.Hour, 13); }
public void Test_SetValueByText_Sequence() { PropertyInfo property = (typeof(ZteSignal)).GetProperty("Sequence"); ZteSignal signal = new ZteSignal { Sequence = 1 }; signal.SetValueByText(property, "2"); Assert.AreEqual(signal.Sequence, 2); }