static void Main(string[] args) { // if the database appears to be passed in, use that FlipShareDatabase db; if (args.Length > 0) { db = new FlipShareDatabase(args[0]); } else { // none passed in, let it discover the location on its own db = new FlipShareDatabase(); } Console.WriteLine("Reading flipshare database: {0}", db.DatabaseFilePath); foreach (var entry in db.Entries) { Console.WriteLine("{0} {1} {2} {3} {4}", entry.Name, entry.PreviewImagePath, entry.Uri, entry.VideoFormat, entry.FolderName); } }
public void NormalReadWorks() { // NOTE: this test assumes you have a flipshare database in place and it has entries. It will fail // if either of those are not true. var db = new FlipShareDatabase(); Assert.IsTrue(File.Exists(db.DatabaseFilePath)); var entries = db.Entries; Assert.IsNotNull(entries); Assert.IsTrue(entries.Any()); foreach (var entry in entries) { Assert.IsTrue(File.Exists(entry.PreviewImagePath)); Assert.IsFalse(String.IsNullOrEmpty(entry.FolderName)); Assert.IsFalse(String.IsNullOrEmpty(entry.Name)); Assert.IsFalse(String.IsNullOrEmpty(entry.VideoFormat)); Assert.IsFalse(String.IsNullOrEmpty(entry.Uri)); } }