Ejemplo n.º 1
0
        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"));
            }
        }
Ejemplo n.º 2
0
        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"));
            }
        }