public void WrongFileFormat() { var parser = new IniParser.IniParser("test.in"); var ex = Assert.ThrowsException <IniParser.IniParserException.WrongFileFormat>(() => parser.ReadData()); Assert.AreEqual("Wrong file format! It should be '.ini'!", ex.Message); }
public void TestFileNotFound() { var parser = new IniParser.IniParser("lab1.in"); var ex = Assert.ThrowsException <IniParser.IniParserException.FileNotFound>(() => parser.ReadData()); Assert.AreEqual("This file was not found!", ex.Message); }