Converts an Int32 (or nullable) to an AttributeColumn.
Inheritance: System.Management.Automation.PSTypeConverter
        public void ConvertAttributeColumnToString()
        {
            var converter = new AttributeColumnTypeConverter();
            var column    = new AttributeColumn(null, 42);

            Assert.IsFalse(converter.CanConvertTo(column, typeof(string)));
            converter.ConvertTo(column, typeof(string), CultureInfo.InvariantCulture, false);
        }
        public void ConvertIntegerToAttributeColumn()
        {
            var converter = new AttributeColumnTypeConverter();

            Assert.IsFalse(converter.CanConvertFrom(0, typeof(AttributeColumn)));

            converter.ConvertFrom(0, typeof(AttributeColumn), null, false);
        }
        public void ConvertAttributeColumnToNullableInteger()
        {
            var converter = new AttributeColumnTypeConverter();
            var column    = new AttributeColumn(null, null);

            Assert.IsTrue(converter.CanConvertTo(column, typeof(int?)));
            int?value = (int?)converter.ConvertTo(column, typeof(int?), CultureInfo.InvariantCulture, false);

            Assert.IsNull(value);
        }
        public void ConvertAttributeColumnToInteger()
        {
            var converter = new AttributeColumnTypeConverter();
            var column    = new AttributeColumn(null, 42);

            Assert.IsTrue(converter.CanConvertTo(column, typeof(int)));
            int value = (int)converter.ConvertTo(column, typeof(int), CultureInfo.InvariantCulture, false);

            Assert.AreEqual <int>(42, value);
        }
        public void ConvertNullAttributeColumnToInteger()
        {
            var converter = new AttributeColumnTypeConverter();

            Assert.IsFalse(converter.CanConvertTo(null, typeof(int)));
        }