public CustomizedTypesShould() { AttributeTesterViaType = new AttributeTester <Type>( PrepType, () => Spec.Attributes, FinishType, () => Adapter.GetType(), t => t.GetCustomAttributes()); Spec = null; Adapter = null; }
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(); }