public void Test_AttachmentService_Process() { var pending = new AttachmentPending { Id = 1, UserId = 1, Group = "test" }; var pendings = new List<AttachmentPending>(); var result = this.AttachmentService.Process(pending, pendings, _source); var date = DateTime.Now; Assert.IsTrue(result, "Result"); Assert.AreEqual(1, pendings.Count, "Count"); Assert.AreEqual("test.jpg", pendings[0].Attachment.FileName, "FileName"); Assert.AreEqual("test2.jpg", pendings[0].Attachment.FileDiskName, "FileDiskName"); Assert.AreEqual("test3", pendings[0].Attachment.FileType, "FileType"); Assert.AreEqual("jpg", pendings[0].Attachment.FileExtension, "FileExtension"); Assert.AreEqual("{0}/{1}/{2}".FormatInvariant(date.Year, date.Month, date.Day), pendings[0].Attachment.FilePath, "FilePath"); Assert.AreEqual(200, pendings[0].Attachment.FileWidth, "FileWidth"); Assert.AreEqual(200, pendings[0].Attachment.FileHeight, "FileHeight"); }
public void InsertPending(AttachmentPending pending) { }
public void DeletePending(AttachmentPending pending) { }
public void DeletePending(AttachmentPending pending, bool cascade) { }
public bool Process(AttachmentPending pending, IList<AttachmentPending> items, HttpPostedFileBase source) { return true; }