public void ConvertFrom_OFF_StringToBool_ReturnsFalse()
        {
            var converter = new HtmlFormDataTypeConverter(typeof (bool));

            var value = (bool) converter.ConvertFrom("off");
            Assert.IsFalse(value);
        }
        public void ConvertFrom_NullToBool_ReturnsFalse()
        {
            var converter = new HtmlFormDataTypeConverter(typeof (bool));

            var value = (bool) converter.ConvertFrom(null);
            Assert.IsFalse(value);
        }
        public void ConvertFrom_off_StringToBool_ReturnsFalse()
        {
            var converter = new HtmlFormDataTypeConverter(typeof(bool));

            var value = (bool)converter.ConvertFrom("off");

            Assert.IsFalse(value);
        }
        public void ConvertFrom_StringToInt_ReturnsNull()
        {
            var converter = new HtmlFormDataTypeConverter(typeof(int));

            var value = converter.ConvertFrom("42");

            Assert.IsNull(value);
        }
        public void ConvertFrom_UnsupportedStringToBool_ReturnsNull()
        {
            var converter = new HtmlFormDataTypeConverter(typeof(bool));

            var value = converter.ConvertFrom("woah");

            Assert.IsNull(value);
        }
        public void ConvertFrom_NullToBool_ReturnsFalse()
        {
            var converter = new HtmlFormDataTypeConverter(typeof(bool));

            var value = (bool)converter.ConvertFrom(null);

            Assert.IsFalse(value);
        }
        public void ConvertFrom_UnsupportedStringToBool_ReturnsNull()
        {
            var converter = new HtmlFormDataTypeConverter(typeof (bool));

            object value = converter.ConvertFrom("woah");
            Assert.IsNull(value);
        }
        public void ConvertFrom_StringToInt_ReturnsNull()
        {
            var converter = new HtmlFormDataTypeConverter(typeof (int));

            object value = converter.ConvertFrom("42");
            Assert.IsNull(value);
        }