Esempio n. 1
0
        public void Apply_SetsApiExplorerVisibility()
        {
            // Arrange
            var action     = GetActionModel();
            var convention = new ApiVisibilityConvention();

            // Act
            convention.Apply(action);

            // Assert
            Assert.True(action.ApiExplorer.IsVisible);
        }
Esempio n. 2
0
        public void Apply_DoesNotSetApiExplorerVisibility_IfAlreadySpecifiedOnController()
        {
            // Arrange
            var action = GetActionModel();

            action.Controller.ApiExplorer.IsVisible = false;
            var convention = new ApiVisibilityConvention();

            // Act
            convention.Apply(action);

            // Assert
            Assert.Null(action.ApiExplorer.IsVisible);
        }