public void ConstructorSetsParameterInfo() { // Arrange ParameterInfo pInfo = typeof(MyController).GetMethod("Foo").GetParameters()[0]; // Act ReflectedParameterDescriptor pd = new ReflectedParameterDescriptor(pInfo, new Mock<ActionDescriptor>().Object); // Assert Assert.AreSame(pInfo, pd.ParameterInfo); }
public void ConstructorSetsActionDescriptorProperty() { // Arrange ParameterInfo pInfo = typeof(MyController).GetMethod("Foo").GetParameters()[0]; ActionDescriptor ad = new Mock<ActionDescriptor>().Object; // Act ReflectedParameterDescriptor pd = new ReflectedParameterDescriptor(pInfo, ad); // Assert Assert.AreSame(ad, pd.ActionDescriptor); }
public DescribedMvcActionParameterInfo(ParameterDescriptor paramDescr, ActionInfo action) : base(action) { this.paramDescr = paramDescr; this.reflectedParamDescr = paramDescr as ReflectedParameterDescriptor; }