Example #1
0
        public void GetFileInfo_textForTestTXT_NowYouSeeSharp_returned()
        {
            //arrange
            string path     = @"text_for_test.txt";
            string expected = "NowYouSeeSharp";
            //act
            string actual = WordProcessing.GetFileInfo(path);

            //assert
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void GetFileInfo_wordTextForTestDocx_helloThere_returned()
        {
            //arrange
            string path     = Environment.CurrentDirectory + @"\word_text_for_test.docx";
            string expected = "-hello there!";
            //act
            string actual = WordProcessing.GetFileInfo(path);

            //assert
            Assert.AreEqual(expected, actual);
        }
Example #3
0
 private void Choose_Key_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         KeyText.Text = WordProcessing.GetFileInfo(FileProcessing.ChooseFile());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }