public void WhenParameterAttributeIsHidden_ThenAdapterParameterDoesNotHaveHiddenAttribute() { var p = ParamSettings.WithName("x"); var pAtts = p.Attributes; Spec.SpecifyMethod() .WithFunctionSignature <int, int, int>(nameof(CustomizedParameterShouldModel.Sum), p); IAdapter <CustomizedParameterShouldModel> adapter = null; var attributeTester = new AttributeTester <ParameterInfo>( () => { }, () => pAtts, () => adapter = Spec.Finish().Create(null), () => adapter.GetType().GetMethod(nameof(CustomizedParameterShouldModel.Sum)).GetParameters()[0], pi => pi.GetCustomAttributes()); attributeTester.TestHidingAttribute(); }
public void GivenType_WhenAttributeIsHidden_AdapterDoesNotHaveHiddenAttribute() { AttributeTesterViaType.TestHidingAttribute(); }