Пример #1
0
        public void IllegalDestinationPath()
        {
            var source = new CustomFileSource(new List <FileMapping> {
                new FileMapping("a", "../../dest1"),
            });

            new TorrentCreator().Create(source);
        }
 public void IllegalDestinationPath()
 {
     Assert.Throws <ArgumentException> (() => {
         var source = new CustomFileSource(new List <FileMapping> {
             new FileMapping("a", "../../dest1"),
         });
         new TorrentCreator(Factories.Default.WithPieceWriterCreator(files => new DiskWriter(files))).Create(source);
     });
 }
Пример #3
0
 public void IllegalDestinationPath()
 {
     Assert.Throws <ArgumentException> (() => {
         var source = new CustomFileSource(new List <FileMapping> {
             new FileMapping("a", "../../dest1"),
         });
         new TorrentCreator().Create(source);
     });
 }
Пример #4
0
        public void TwoFilesSameDestionation()
        {
            var source = new CustomFileSource(new List <FileMapping> {
                new FileMapping("a", "dest1"),
                new FileMapping("b", "dest2"),
                new FileMapping("c", "dest1"),
            });

            new TorrentCreator().Create(source);
        }
 public void TwoFilesSameDestination()
 {
     Assert.Throws <ArgumentException> (() => {
         var source = new CustomFileSource(new List <FileMapping> {
             new FileMapping("a", "dest1"),
             new FileMapping("b", "dest2"),
             new FileMapping("c", "dest1"),
         });
         new TorrentCreator(Factories.Default).Create(source);
     });
 }
Пример #6
0
 public void TwoFilesSameDestionation ()
 {
     var source = new CustomFileSource (new List <FileMapping> {
         new FileMapping("a", "dest1"),
         new FileMapping ("b", "dest2"),
         new FileMapping ("c", "dest1"),
     });
     new TorrentCreator ().Create (source);
 }
Пример #7
0
 public void IllegalDestinationPath ()
 {
     var source = new CustomFileSource (new List <FileMapping> {
         new FileMapping("a", "../../dest1"),
     });
     new TorrentCreator ().Create (source);
 }