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 bool IsEmpty() { return(base.IsEmpty() && string.IsNullOrEmpty(fAutomatedRecordID) && fChangeDate.IsEmpty() && (fNotes == null || fNotes.Count == 0) && (fSourceCitations == null || fSourceCitations.Count == 0) && (fMultimediaLinks == null || fMultimediaLinks.Count == 0) && (fUserReferences == null || fUserReferences.Count == 0)); }