Ejemplo n.º 1
0
 public void FileStoreReaderWriter_File_Roundtrip_Test()
 {
     var store = new FileStoreMock();
       var fi = new FileInfo(@"img\Patern_test.jpg");
       var reader = new FileStoreReader(store);
       var writer = new FileStoreWriter(store);
       var server = new FileServer(DlnaMediaTypes.All, null, new DirectoryInfo[] { new DirectoryInfo(".") });
       var item = new BaseFileMock(server,fi,DlnaMime.AudioAAC,DlnaMediaTypes.Image);
       writer.StoreFile(item);
       var result = reader.GetFile(fi, null, NMaier.SimpleDlna.Server.DlnaMime.ImageJPEG);
       Assert.IsNotNull(result);
       Assert.AreEqual(item.Path, result.Path);
 }
Ejemplo n.º 2
0
        public void FileStoreReaderWriter_File_Roundtrip_Test()
        {
            var store  = new FileStoreMock();
            var fi     = new FileInfo(@"img\Patern_test.jpg");
            var reader = new FileStoreReader(store);
            var writer = new FileStoreWriter(store);
            var server = new FileServer(DlnaMediaTypes.All, null, new DirectoryInfo[] { new DirectoryInfo(".") });
            var item   = new BaseFileMock(server, fi, DlnaMime.AudioAAC, DlnaMediaTypes.Image);

            writer.StoreFile(item);
            var result = reader.GetFile(fi, null, NMaier.SimpleDlna.Server.DlnaMime.ImageJPEG);

            Assert.IsNotNull(result);
            Assert.AreEqual(item.Path, result.Path);
        }