public virtual void testGetCreatePartByCID() { AttachmentCollection multipart = null; Attachment bp = MimeUtil.GetCreatePartByCID(multipart, "cid1"); MimeUtil.SetAttachmentContent(bp, "boo"); Attachment bp2 = MimeUtil.GetCreatePartByCID(multipart, "cid2"); MimeUtil.SetAttachmentContent(bp2, "bar"); Attachment bp3 = MimeUtil.GetCreatePartByCID(multipart, "cid1"); Assert.AreEqual(bp, bp3); Assert.AreEqual(2, multipart.Count); Assert.AreEqual("boo", MimeUtil.GetAttachmentContent(bp3)); }