Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test coverage for the PropertyGrid class #12055

Open
91 tasks
LeafShi1 opened this issue Sep 5, 2024 · 0 comments
Open
91 tasks

Unit test coverage for the PropertyGrid class #12055

LeafShi1 opened this issue Sep 5, 2024 · 0 comments
Assignees
Labels
test-bug Problem in test source code (most likely)
Milestone

Comments

@LeafShi1
Copy link
Member

LeafShi1 commented Sep 5, 2024

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
@LeafShi1 LeafShi1 changed the title The missed test of the PropertyGrid.cs Unit test coverage for the PropertyGrid class Sep 5, 2024
@LeafShi1 LeafShi1 added the test-bug Problem in test source code (most likely) label Sep 5, 2024
@Tanya-Solyanik Tanya-Solyanik added this to the .NET 10.0 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-bug Problem in test source code (most likely)
Projects
None yet
Development

No branches or pull requests

3 participants