public void ApiExplorer_SkipsConventionalRoutedController_WhenConfiguredOnApplication() { // Arrange var convention = new ApiExplorerIsVisibleConvention(isVisible: true); var provider = GetProvider( typeof(ConventionallyRoutedController).GetTypeInfo(), convention); // Act var actions = provider.GetDescriptors(); // Assert var action = Assert.Single(actions); Assert.Null(action.GetProperty<ApiDescriptionActionData>()); }
public void ApiExplorer_IsVisibleOnApplication_CanOverrideOnAction() { // Arrange var convention = new ApiExplorerIsVisibleConvention(isVisible: true); var provider = GetProvider( typeof(ApiExplorerExplicitlyNotVisibleOnActionController).GetTypeInfo(), convention); // Act var actions = provider.GetDescriptors(); // Assert var action = Assert.Single(actions); Assert.Null(action.GetProperty<ApiDescriptionActionData>()); }