Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }