Пример #1
0
        public void BoolSettingDefinition_ConvertFromString_PerformsValidConversions()
        {
            var definition = new BoolSettingDefinition("test", "desc", false);

            Assert.False(definition.ConvertFromString("false"));
            Assert.False(definition.ConvertFromString("FALSE"));
            Assert.True(definition.ConvertFromString("true"));
            Assert.True(definition.ConvertFromString("TRUE"));
        }
Пример #2
0
        public void BoolSettingDefinition_ConvertFromString_RaisesFormatException()
        {
            var definition = new BoolSettingDefinition("test", "desc", false);

            Assert.Throws <FormatException>(() => definition.ConvertFromString("no"));
        }