System.Runtime.Serialization.Formatters.Tests.FormatterConverterTests.InvalidArguments_ThrowExceptions C# (CSharp) Method

InvalidArguments_ThrowExceptions() private method

private InvalidArguments_ThrowExceptions ( ) : void
return void
        public void InvalidArguments_ThrowExceptions()
        {
            var f = new FormatterConverter();
            Assert.Throws<ArgumentNullException>("value", () => f.Convert(null, typeof(int)));
            Assert.Throws<ArgumentNullException>("value", () => f.Convert(null, TypeCode.Char));
            Assert.Throws<ArgumentNullException>("value", () => f.ToBoolean(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToByte(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToChar(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToDateTime(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToDecimal(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToDouble(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToInt16(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToInt32(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToInt64(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToSByte(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToSingle(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToString(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToUInt16(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToUInt32(null));
            Assert.Throws<ArgumentNullException>("value", () => f.ToUInt64(null));
        }