public void TestReadEGNsFromFileFileNotFoundException() { string actualText = EGNExtractor_Accessor.ReadEGNsFromFile("Go6o.txt"); Assert.Fail("If there is no such file for read" + " method should throw FileNotFoundException!"); }
public void TestReadEGNsFromFile() { string inputFileName = Path.GetTempFileName(); string textForWrite = "I am bay Ivan and my personal ID number is 4806182906!"; WriteTextToFile(inputFileName, textForWrite); string expectedText = textForWrite; string actualText = EGNExtractor_Accessor.ReadEGNsFromFile(inputFileName); Assert.AreEqual <string>(expectedText, actualText, "There is a problem reading the file!"); }