Skip to content

Unit test coverage for the PropertyGrid class #12055

@LeafShi1

Description

@LeafShi1

Currently the unit test coverage of the PropertyGrid is 49.91%

image

The following code lacks unit test coverage. For details, please refer to Code Coverage

The code line under Constructor:

  • if (ScaleHelper.IsThreadPerMonitorV2Aware)
  • catch (Exception ex) when (!ex.IsCriticalException())

Functions:

  • PropertyGrid
  • AddTab
  • CollapseAllGridItems
  • ClearTabs
  • CreateGridView if (_inGridViewCreate)
  • CreateTab
  • DisplayCommandsPane
  • Dispose if (GetFlag(Flags.GotDesignerEventService))
  • DividerDraw if (y == -1)
  • DividerInside
  • DividerLimitHigh
  • DrawXorBar
  • EnablePropPageButton
  • EnableTabs
  • EnsureLargeButtons
  • AddLargeImage
  • EnsurePendingChangesCommitted
  • ExpandAllGridItems
  • GetCommonTabs
  • GetElementFromPoint
  • GetUnwrappedObject
  • GetCurrentEntries
  • DropDownDone
  • HandleF4
  • SaveState
  • LoadState
  • OnActiveDesignerChanged
  • OnChanged
  • OnChildMouseMove
  • OnChildMouseDown
  • OnComponentAdded
  • OnComponentChanged
  • OnComponentRemoved
  • OnFontChanged
  • OnGotFocus
  • ScaleCore
  • OnLayoutInternal
  • OnMouseMove
  • OnMouseUp
  • OnRequestEdit
  • OnComComponentNameChanged
  • OnNotifyPropertyValueUIItemsChanged
  • OnPaint if (_commandsPane.Visible)
  • OnPropertyValueSet
  • OnTransactionClosed
  • OnTransactionOpened
  • OnTypeDescriptorRefreshed
  • OnTypeDescriptorRefreshedInvoke
  • OnViewPropertyPagesButtonClick
  • ProcessDialogKey
  • Refresh if (GetFlag(Flags.RefreshingProperties))
  • Refresh(bool clearCached) if (Disposing || GetFlag(Flags.RefreshingProperties))
  • RefreshTabs
  • ReleaseTab
  • RemoveTabs(PropertyTabScope classification, bool setupToolbar)
  • RemoveTab(int tabIndex, bool setupToolbar)
  • RemoveTab(Type tabType) if (tabIndex == -1)
  • ResetHelpBackColor
  • ResetHelpForeColor
  • ReplaceSelectedObject
  • TryGetSavedTabIndex if (_designerSelections is null || ActiveDesigner is null)
  • SelectViewTabButtonDefault
  • SetSelectState
  • SetupToolbar
  • ShowEventsButton
  • SinkPropertyNotifyEvents
  • ShouldForwardChildMouseMessage
  • UpdatePropertiesViewTabVisibility
  • UpdateSelection
  • WantsTab
  • RescaleConstants
  • WndProc

Properties:

  • ActiveDesigner if (_rootEntry is not null)
  • CanCopy
  • CanCut
  • CanPaste
  • CanUndo
  • CommandsVisibleIfAvailable if (hotcommandsVisible != _commandsPane.Visible)
  • FreezePainting get => _paintFrozen > 0;
  • GridViewVisible
  • PropertySort if (selectedGridItem is not null)
  • SelectedObjects Set method
  • SortedByCategories
  • ToolStripRenderer Get method
  • IComPropertyBrowser.ComComponentNameChanged
  • PropertyTabChanged Remove method
  • SelectedGridItemChanged Remove method
  • InPropertySet
  • UseCompatibleTextRendering Set method

Metadata

Metadata

Assignees

Labels

test-bugProblem in test source code (most likely)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions