예제 #1
0
        public void DeleteAllItems()
        {
            using (DummySavedVersionsDialog dlg = new DummySavedVersionsDialog(Cache))
            {
                TreeView tree = dlg.ArchiveTree;

                while (tree.Nodes.Count != 0)
                {
                    tree.SelectedNode = tree.Nodes[0];
                    dlg.SimulateDelete();
                }

                // Verify that the buttons are disabled
                Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
                Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
                dlg.Close();
            }
        }
        public void DeleteAllItems()
        {
            DummySavedVersionsDialog dlg = new DummySavedVersionsDialog(m_cache);
            TreeView tree = dlg.ArchiveTree;

            while (tree.Nodes.Count != 0)
            {
                tree.SelectedNode = tree.Nodes[0];
                dlg.SimulateDelete();
            }

            // Verify that the buttons are disabled
            Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
            Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
            dlg.Close();

            // Also check to see if the dialog comes up with the buttons disabled when there
            // are no archives
            dlg = new DummySavedVersionsDialog(m_cache);

            // Verify that the buttons are disabled
            Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
            Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
        }
		public void DeleteAllItems()
		{
			using (DummySavedVersionsDialog dlg = new DummySavedVersionsDialog(Cache))
			{
				TreeView tree = dlg.ArchiveTree;

				while (tree.Nodes.Count != 0)
				{
					tree.SelectedNode = tree.Nodes[0];
					dlg.SimulateDelete();
				}

				// Verify that the buttons are disabled
				Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
				Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
				dlg.Close();
			}
		}
		public void DeleteAllItems()
		{
			DummySavedVersionsDialog dlg = new DummySavedVersionsDialog(m_cache);
			TreeView tree = dlg.ArchiveTree;

			while (tree.Nodes.Count != 0)
			{
				tree.SelectedNode = tree.Nodes[0];
				dlg.SimulateDelete();
			}

			// Verify that the buttons are disabled
			Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
			Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
			dlg.Close();

			// Also check to see if the dialog comes up with the buttons disabled when there
			// are no archives
			dlg = new DummySavedVersionsDialog(m_cache);

			// Verify that the buttons are disabled
			Assert.IsFalse(dlg.ComparetoCurrentVersionBtn.Enabled, "The Compare to Current Version button should be disabled");
			Assert.IsFalse(dlg.DeleteBtn.Enabled, "The delete button should be disabled");
		}