Пример #1
0
        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());
        }
Пример #2
0
        public void DateOnlyFieldTest()
        {
            MDEntryDate d = new MDEntryDate(new DateTime(2011, 11, 30, 8, 9, 10, 555));

            Assert.AreEqual("20111130", d.ToString());
        }