コード例 #1
0
        public void GetWordsFromFile_ShouldWorksCorrect_WhenReadWordsFromFile()
        {
            var reader = new DocxFileReader();

            var filePath = Path.Combine(Environment.CurrentDirectory, "TestsResourses\\file2.docx");

            var result = reader.GetWordsFromFile(filePath);

            result.GetValueOrThrow().Should().BeEquivalentTo("Всем", "Привет", "Это", "Данил");
        }
コード例 #2
0
 public void GetWordsFromFile_ShouldThrow_WhenFileDoesNotExists()
 {
     reader.GetWordsFromFile("bla bla file").IsSuccess.Should().BeFalse();
 }
コード例 #3
0
        public void GetWordsFromFile_ShouldThrow_WhenFileDoesNotExists()
        {
            Action act = () => reader.GetWordsFromFile("bla bla file");

            act.Should().Throw <ArgumentException>();
        }