public void Initialization_NonTypeInstantiationMember() { var member = ReflectionObjectMother.GetSomeMember(); var parameter = ReflectionObjectMother.GetSomeParameter(); Dev.Null = new MemberParameterOnInstantiation(member, parameter); }
public static MutableParameterInfo Create( MemberInfo member = null, int position = 7, string name = "abc", Type type = null, ParameterAttributes attributes = (ParameterAttributes)7) { member = member ?? ReflectionObjectMother.GetSomeMember(); type = type ?? ReflectionObjectMother.GetSomeType(); return(new MutableParameterInfo(member, position, name, type, attributes)); }
public void Initialization_NullName() { var member = ReflectionObjectMother.GetSomeMember(); var type = ReflectionObjectMother.GetSomeType(); var parameter = new TestableCustomParameterInfo(member, 7, null, type, (ParameterAttributes)7); Assert.That(parameter.Name, Is.Null); }
public void SetUp() { _member = ReflectionObjectMother.GetSomeMember(); _position = 7; _name = "abc"; _type = ReflectionObjectMother.GetSomeType(); _attributes = (ParameterAttributes)7; _parameter = new TestableCustomParameterInfo(_member, _position, _name, _type, _attributes); }
public void SetUp() { _declaringMember = ReflectionObjectMother.GetSomeMember(); _position = 7; _name = "Parameter name"; _type = ReflectionObjectMother.GetSomeType(); _attributes = (ParameterAttributes)7; _parameter = new ParameterOnCustomMember(_declaringMember, _position, _name, _type, _attributes); }
public void Initialization_NonTypeInstantiationMember() { var member = ReflectionObjectMother.GetSomeMember(); var parameter = ReflectionObjectMother.GetSomeParameter(); Assert.That( () => Dev.Null = new MemberParameterOnInstantiation(member, parameter), Throws.ArgumentException .With.ArgumentExceptionMessageEqualTo( "MemberParameterOnInstantiation can only represent parameters of members on TypeInstantiation or parameters of " + "MethodInstantiation instances.", "declaringMember")); }
public void Initialization() { var member = ReflectionObjectMother.GetSomeMember(); var position = 7; var name = "abc"; var type = ReflectionObjectMother.GetSomeType(); var attributes = (ParameterAttributes)7; var parameter = new MutableParameterInfo(member, position, name, type, attributes); CustomParameterInfoTest.CheckParameter(parameter, member, position, name, type, attributes); }