public void TestConstructors() { var resource = new byte[] {}; var fa = new FileAttachment(resource); Assert.AreEqual(resource, fa.GetResourceAsByteArray()); fa = new FileAttachment(resource, "MyName"); Assert.AreEqual(resource, fa.GetResourceAsByteArray()); Assert.AreEqual("MyName", fa.Name); fa = new FileAttachment(resource, "MyName2", "Word Doc"); Assert.AreEqual(resource, fa.GetResourceAsByteArray()); Assert.AreEqual("MyName2", fa.Name); Assert.AreEqual("Word Doc", fa.MimeType); }
public void UploadFile(FileAttachment fileAttachment) {}