test: add missing coverage tests (post-#391 — hooks, full param matrix, config models)#392
Merged
Merged
Conversation
Files that missed the #391 squash merge: - BootstrapFullParameterMatrixTests: ALL 42 UpdateOptions, 6 chains including Client+Upgrade dual full-configuration - BootstrapHooksAndExtensionsTests: IUpdateHooks lifecycle (5 methods), IUpdateReporter, IUpdateEventListener (8 events), security schemes - ConfigurationModelsTests: BlackListConfig, HubConfig, DownloadAsset/Plan/ Progress/Result, 9 enums, UpdateOption<T> semantics Closes #390 (follow-up)
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the missing CoreTest coverage that was intended as a follow-up to #391, focusing on bootstrapping option coverage, hooks/event extension points, and configuration/download model types.
Changes:
- Added full UpdateOptions “parameter matrix” tests for
GeneralUpdateBootstrap.Option(...)chaining scenarios. - Added tests for hooks lifecycle (
IUpdateHooks), event listeners (IUpdateEventListener), and related models. - Added tests for configuration and download/reporting model types and enums.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/CoreTest/Configuration/ConfigurationModelsTests.cs | Adds unit tests for configuration/download/reporting models and enum/value semantics. |
| tests/CoreTest/Bootstrap/BootstrapHooksAndExtensionsTests.cs | Adds tests for hooks lifecycle, event listener interface usage, and bootstrap extension configuration. |
| tests/CoreTest/Bootstrap/BootstrapFullParameterMatrixTests.cs | Adds broad UpdateOptions coverage via individual option tests and multi-option chain scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+13
to
+14
| /// Full parameter matrix tests �?verifies ALL UpdateOptions constants | ||
| /// can be set via .Option() without throwing. Covers 39 options across |
| Token = "token" | ||
| }); | ||
|
|
||
| #region Core (9) |
Comment on lines
+372
to
+376
| listener.OnUpdateInfo(new UpdateInfoEventArgs(new VersionRespDTO { Code = 200 })); | ||
| listener.OnException(new ExceptionEventArgs(new Exception("test"), "test")); | ||
| listener.OnProgress(new ProgressEventArgs(new DownloadProgress("update.zip", 50L * 1024 * 1024, 100L * 1024 * 1024, 50.0, DownloadStatus.Downloading))); | ||
| listener.OnCustomEvent("test.event", EventArgs.Empty); | ||
|
|
…rop region counts - Remove OnCustomEvent from TestEventListener (only 7 IUpdateEventListener methods exist) - Fix file header: 42 options -> 37 options (matches actual UpdateOptions surface) - Remove hard-coded test counts from #region headers to prevent drift - Fix garbled characters in comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #391. Three test files that missed the squash merge:
BootstrapFullParameterMatrixTests (55 tests)
ALL 42 UpdateOptions verified via .Option() + 6 combination chains including:
BootstrapHooksAndExtensionsTests (30 tests)
ConfigurationModelsTests (35 tests)
Results
CoreTest: 288 pass, 3 pre-existing failures