public void GetCustomAttributesFilterByType() { // Arrange ReflectedDelegatePatternActionDescriptor ad = GetActionDescriptor(_actionMethod); // Act object[] attributes = ad.GetCustomAttributes(typeof(OutputCacheAttribute), true /* inherit */); // Assert Assert.AreEqual(0, attributes.Length); }
public void GetCustomAttributes() { // Arrange ReflectedDelegatePatternActionDescriptor ad = GetActionDescriptor(_actionMethod); // Act object[] attributes = ad.GetCustomAttributes(true /* inherit */); // Assert Assert.AreEqual(1, attributes.Length); Assert.IsInstanceOfType(attributes[0], typeof(AuthorizeAttribute)); }