public void Test_Common() { using (GDMChangeDate cd = new GDMChangeDate(null)) { Assert.IsNotNull(cd); DateTime dtNow = DateTime.Now; dtNow = dtNow.AddTicks(-dtNow.Ticks % 10000000); cd.ChangeDateTime = dtNow; DateTime dtx = cd.ChangeDateTime; Assert.AreEqual(dtNow, dtx); Assert.AreEqual(dtNow.ToString("yyyy.MM.dd HH:mm:ss"), cd.ToString()); cd.ChangeDateTime = TestUtils.ParseDTX("04.01.2013 11:12"); using (GDMChangeDate chd2 = new GDMChangeDate(null)) { Assert.IsNotNull(chd2); Assert.Throws(typeof(ArgumentException), () => { chd2.Assign(null); }); chd2.Assign(cd); string buf = TestUtils.GetTagStreamText(chd2, 1); Assert.AreEqual("1 CHAN\r\n" + "2 DATE 04 JAN 2013\r\n" + "3 TIME 11:12:00\r\n", buf); } Assert.IsFalse(cd.IsEmpty()); cd.Clear(); Assert.IsTrue(cd.IsEmpty()); } }
public override void Clear() { base.Clear(); fAutomatedRecordID = string.Empty; fChangeDate.Clear(); fNotes.Clear(); fSourceCitations.Clear(); fMultimediaLinks.Clear(); fUserReferences.Clear(); fUID = string.Empty; }
public override void Clear() { base.Clear(); fAutomatedRecordID = string.Empty; fChangeDate.Clear(); if (fNotes != null) { fNotes.Clear(); } if (fSourceCitations != null) { fSourceCitations.Clear(); } if (fMultimediaLinks != null) { fMultimediaLinks.Clear(); } if (fUserReferences != null) { fUserReferences.Clear(); } fUID = string.Empty; }