container icon indicating copy to clipboard operation
container copied to clipboard

Fix ParameterBase.Equals(Type type) throwing on 'null'

Open ENikS opened this issue 6 years ago • 0 comments

Description

The Equals() method should never throw an exception. It should simply return true or false

To Reproduce

        [DataTestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        [DynamicData(nameof(GetSupportedParametersData), DynamicDataSourceType.Method)]
        public void EqualsValidationTest(ParameterValue parameter)
        {
            Assert.IsTrue(parameter.Equals(null));
        }

ENikS avatar May 30 '20 22:05 ENikS