Exemplo n.º 1
0
 public void AddNewPath_PathExists_PathAtTopOfList()
 {
     using (TempFile existingFile = new TempFile())
     {
         _MostRecentPathsList.AddNewPath(existingFile.FileName);
         string[] mruPaths = _MostRecentPathsList.Paths;
         Assert.AreEqual(1, mruPaths.Length);
         Assert.AreEqual(existingFile.FileName, mruPaths[0]);
     }
 }
        public void LaunchDemoDialog()
        {
            Browser.SetUpXulRunner();
            var mru = new MostRecentPathsList();

            foreach (var dir in Directory.GetDirectories(NewCollectionWizard.DefaultParentDirectoryForCollections))
            {
                foreach (var path in Directory.GetFiles(dir, "*.BloomCollection"))
                {
                    mru.AddNewPath(path);
                    break;
                }
            }
            using (var dlg = new OpenAndCreateCollectionDialog(mru))
            {
                dlg.ShowDialog();
            }
        }