Esempio n. 1
0
        public void TestThatGetWordFrequenciesFromXmlFileReturnsExpectedDocumentData()
        {
            var documentData = documentDataBusinessLogic.GetDocumentDataFromXmlFile(filepath);

            Assert.IsTrue(compareLogic.Compare(Constants.DocumentTitle, documentData.Title).AreEqual);
            Assert.IsTrue(compareLogic.Compare(Constants.CodesFromXml, documentData.Topics).AreEqual);
            Assert.IsTrue(compareLogic.Compare(Constants.WordFrequenciesFromText, documentData.TextData.WordDictionary).AreEqual);
            Assert.IsTrue(compareLogic.Compare(Constants.AcronymFrequenciesFromText, documentData.TextData.AcronymDictionary).AreEqual);
        }
        private void buttonRun_Click(object sender, EventArgs e)
        {
            try
            {
                var documentData = documentDataBusinessLogic.GetDocumentDataFromXmlFile(textBoxFilepath.Text);

                documentDataDisplayUserControl.DisplayDocumentData(documentData);

                SetStatusLabel("Done", Color.GreenYellow);
            }
            catch (Exception exception)
            {
                SetStatusLabel("Error", Color.Red);
                //textBoxResult.Text = exception.ToString();
            }
        }