public void DateOnlyFieldTest() { fieldmap.SetField(new DateOnlyField(Tags.MDEntryDate, new DateTime(2009, 12, 10, 1, 2, 3))); MDEntryDate ed = new MDEntryDate(); fieldmap.GetField(ed); Assert.AreEqual(new DateTime(2009, 12, 10), ed.Obj); fieldmap.SetField(new MDEntryDate(new DateTime(2010, 12, 10))); DateOnlyField r = fieldmap.GetField(ed); Assert.AreEqual(new DateTime(2010, 12, 10), ed.getValue()); Assert.AreSame(r, ed); Assert.AreEqual("20101210", ed.ToString()); }
public void DateOnlyFieldTest() { MDEntryDate d = new MDEntryDate(new DateTime(2011, 11, 30, 8, 9, 10, 555)); Assert.AreEqual("20111130", d.ToString()); }