public void TestText_Get() { FieldControlDateItem fc = new FieldControlDateItem(); DateTime dt = new DateTime(2010, 1, 1); fc.DateTime = dt; Assert.IsNotEmpty(fc.Text); Assert.IsTrue(fc.Text.StartsWith("2010-1-1")); }
public void TestText_Set() { FieldControlDateItem fc = new FieldControlDateItem(); fc.Text = "2010-1-1 15:00:00"; DateTime dt = fc.DateTime; Assert.IsNotNull(dt); Assert.AreEqual(2010, dt.Year); Assert.AreEqual(1, dt.Month); Assert.AreEqual(1, dt.Day); Assert.AreEqual(15, dt.Hour); }