public void TestReadInvalidType( [Values] bool caseSensitive) { var options = new IniOptions( caseSensitive: caseSensitive, allowValueConversion: false); using (var reader = new IniReader("basic.ini", options)) { Assert.Throws <InvalidCastException>(() => reader.GetDouble("Section.int")); } }
public void TestReadDouble( [Values] bool caseSensitive, [Values] bool allowValueConversion, [Values] bool allowLooseProperties) { var options = new IniOptions( caseSensitive: caseSensitive, allowValueConversion: allowValueConversion, allowLooseProperties: allowLooseProperties); using (var reader = new IniReader("basic.ini", options)) { Assert.AreEqual(1.1d, reader.GetDouble("Section.float")); } }