Ejemplo n.º 1
0
        public void IsVerbalParameter_ArgumentProcessorSettingWithAttribute_ResultAsExpected(Type type, Boolean expected)
        {
            ParameterObjectAttribute attribute = null;

            if (type == typeof(SwitchParameterAttribute))
            {
                attribute = new SwitchParameterAttribute();
            }
            else if (type == typeof(OptionParameterAttribute))
            {
                attribute = new OptionParameterAttribute();
            }
            else if (type == typeof(VerbalParameterAttribute))
            {
                attribute = new VerbalParameterAttribute();
            }
            else if (type == typeof(UnsupportedParameterAttribute))
            {
                attribute = new UnsupportedParameterAttribute();
            }

            ArgumentProcessorSetting setting = new ArgumentProcessorSetting(new TestPropertyInfo(typeof(Object)), attribute);

            Assert.That(setting.IsVerbalParameter(), Is.EqualTo(expected));
        }
Ejemplo n.º 2
0
        public void IsConverterSupported_WrongParameterObjectAttributeType_ResultIsFalse(Type type)
        {
            ParameterObjectAttribute attribute = null;

            if (type == typeof(SwitchParameterAttribute))
            {
                attribute = new SwitchParameterAttribute();
            }
            else if (type == typeof(VerbalParameterAttribute))
            {
                attribute = new VerbalParameterAttribute();
            }
            else if (type == typeof(UnsupportedParameterAttribute))
            {
                attribute = new UnsupportedParameterAttribute();
            }

            Assert.That(attribute.IsConverterSupported(null), Is.False);
        }