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); }
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); }
private void Choose_Key_Click(object sender, RoutedEventArgs e) { try { KeyText.Text = WordProcessing.GetFileInfo(FileProcessing.ChooseFile()); } catch (Exception ex) { MessageBox.Show(ex.Message); } }