public void CreateTempCopyMissingBackupTest() { MockFileSystem mockFileSystem = new MockFileSystem(); IMessageAttachment attachment = new MessageAttachment(1, AttachmentType.Image, @"C:\backup\1", "abc.jpg"); AttachmentModel_Accessor target = new AttachmentModel_Accessor(mockFileSystem, attachment); string actual = target.CreateTempCopy(); }
public void CreateTempCopyExistingBackupTest() { MockFileSystem mockFileSystem = new MockFileSystem(); const string BackupPath = @"C:\backup\034234aaljkadfalakdjladfaljkdadfa"; mockFileSystem.CreateNewFile(BackupPath); IMessageAttachment attachment = new MessageAttachment(6, AttachmentType.Image, BackupPath, "IMG_003.JPG"); AttachmentModel_Accessor target = new AttachmentModel_Accessor(mockFileSystem, attachment); string copiedFilePath = target.CreateTempCopy(); Assert.IsNotNull(copiedFilePath); }