Exemple #1
0
        public void CMTreeListProcessor_Start_CheckLagerDirs()
        {
            string strMess;
            string strFileName           = Path.Combine(mstrDataDir, "smalldir.txt");
            CMDTreeListProcessor objProc = null;

            try
            {
                objProc = new CMDTreeListProcessor(new FileInfo(strFileName));
            }
            catch (Exception)
            {
                strMess = "Creating the CMDTreeListProcessor should work!";
                Assert.Fail(strMess);
            }
            try
            {
                objProc.Start();
            }
            catch (Exception ex)
            {
                strMess = "Straight fail!\n" + ex.Message;
                Assert.Fail(strMess);
            }
        }
Exemple #2
0
        private void button_ProcessListing_Click(object sender, EventArgs e)
        {
            string strMess;

            //Terrence Knoesen Clear the tree
            treeView_TreeDisplay.Nodes.Clear();
            string strFilePath = this.textBox_TreeListFilePath.Text.Trim();

            if (!File.Exists(strFilePath))
            {
                strMess = String.Format("The TreeListFile doesn't exist!\n\nFile is '{0}' ", strFilePath);
                MessageBox.Show(this, strMess, Program.GetApplicationName(1), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            FileInfo             fil     = new FileInfo(this.textBox_TreeListFilePath.Text.Trim());
            CMDTreeListProcessor objTree = new CMDTreeListProcessor(fil);

            objTree.Start();
        }
Exemple #3
0
        public void CMTreeListProcessor_Start_NonDosListingTwoCharacters()
        {
            string strMess;
            string strFileName           = Path.Combine(mstrDataDir, "NotDosListTwoChar.txt");
            CMDTreeListProcessor objProc = null;

            try
            {
                objProc = new CMDTreeListProcessor(new FileInfo(strFileName));
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
            try
            {
                objProc.Start();
            }
            catch (Exception ex)
            {
                Assert.True(ex.GetType() == typeof(ApplicationException));
                Assert.True(ex.Message.Contains(" is too small to be a DOS directory list!"));
            }
        }