public void Test_GDMSourceCitation() { GDMIndividualRecord indiv = new GDMIndividualRecord(fContext.Tree); GDMSourceRecord sourRec = new GDMSourceRecord(fContext.Tree); using (GDMSourceCitation srcCit = indiv.AddSource(sourRec, "p2", 3)) { Assert.IsNotNull(srcCit); int idx = indiv.IndexOfSource(sourRec); Assert.AreEqual(0, idx); Assert.AreEqual("p2", srcCit.Page); Assert.AreEqual(3, srcCit.CertaintyAssessment); Assert.AreEqual(3, srcCit.GetValidCertaintyAssessment()); Assert.IsTrue(srcCit.IsPointer, "srcCit.IsPointer"); Assert.IsFalse(srcCit.IsEmpty(), "srcCit.IsEmpty()"); // its pointer Assert.Throws(typeof(ArgumentException), () => { srcCit.Assign(null); }); srcCit.Clear(); srcCit.Value = null; Assert.IsTrue(srcCit.IsEmpty(), "srcCit.IsEmpty()"); // its pointer srcCit.Description.Text = "test"; Assert.AreEqual("test", srcCit.Description.Text); } }