public void DeleteArchive(TransferArchive archive) { try { File.Delete(archive.FullName); } catch (Exception) { throw; } }
public void DeleteArchive(TransferArchive archive) { try { _videoManagementRepository.DeleteArchive(archive); } catch (Exception ex) { //_mail.SendEmail(); throw ex; } }
public void MoveArchiveTest(string fullName, string pathFolder) { // Arrange var checksum = _videoManagementAppService.Checksum(fullName); var transferArchive = new TransferArchive(fullName, pathFolder); // Act var result = _videoManagementAppService.MoveArchive(transferArchive); // Assert Assert.AreEqual(result.CheckSum, checksum); }
public void DeleteArchiveTest(string fullName) { // Arrange FileInfo file = new FileInfo(fullName); var transferArchive = new TransferArchive(fullName, string.Empty); // Act _videoManagementAppService.DeleteArchive(transferArchive); var result = file.Exists; // Assert Assert.False(result); }
public void MoveArchive(TransferArchive archive) { try { FileInfo file = new FileInfo(archive.FullName); if (archive.PathTarget != string.Empty) { file.MoveTo(archive.PathTarget + "\\" + file.Name); } } catch (Exception) { throw; } }
public TransferArchiveResponse CopyArchive(TransferArchive archive) { try { var cheksum = Checksum(archive.FullName); TransferArchiveResponse transferArchiveResponse = new TransferArchiveResponse(cheksum); _videoManagementRepository.CopyArchive(archive); return(transferArchiveResponse); } catch (Exception ex) { //_mail.SendEmail(); throw ex; } }