Пример #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();
 }
Пример #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();
 }
Пример #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);
        }
Пример #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);
        }