Skip to content

Add test cases for the Wizard!#509

Merged
jgeurten merged 11 commits into
mainfrom
add-test-cases
Mar 23, 2026
Merged

Add test cases for the Wizard!#509
jgeurten merged 11 commits into
mainfrom
add-test-cases

Conversation

@jgeurten
Copy link
Copy Markdown
Contributor

@jgeurten jgeurten commented Mar 20, 2026

Added 90+ tests to the Wizard (about time)!

  • The tests uncovered some bugs in some of my methods; those have now been fixed
  • Tests must now be run before new PRs and versions:
  • dotnet test "C:\git\WDAC-Toolkit\WDAC-Policy-Wizard\WDAC-Wizard.Tests\WDAC-Wizard.Tests.csproj" 2>&1

or in the UI:

image

Test Explorer Output:

Test explorer will show the result for each test -

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new xUnit-based test project to the WDAC Policy Wizard solution and adjusts core policy/validation logic to support the tests.

Changes:

  • Added WDAC-Wizard.Tests project (xUnit + coverlet) and included it in the solution.
  • Updated WDAC_Policy.UpdateVersion rollover logic and added a null-guard in COM.IsValidRule.
  • Exposed internals to the test assembly via InternalsVisibleTo.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
WDAC-Policy-Wizard/app/src/Policy.cs Changes version increment/rollover logic and adds COM GUID null handling.
WDAC-Policy-Wizard/app/WDAC Wizard.sln Adds the new test project to the solution.
WDAC-Policy-Wizard/app/Properties/AssemblyInfo.cs Adds InternalsVisibleTo for the test assembly.
WDAC-Policy-Wizard/app/.claude/settings.local.json Adds local Claude tool permissions file.
WDAC-Policy-Wizard/WDAC-Wizard.Tests/WDAC-Wizard.Tests.csproj Introduces the new .NET test project and dependencies.
WDAC-Policy-Wizard/WDAC-Wizard.Tests/README.md Documents test suite scope and how to run tests.
WDAC-Policy-Wizard/WDAC-Wizard.Tests/PolicyTests.cs Adds tests for policy logic and supporting classes.
WDAC-Policy-Wizard/WDAC-Wizard.Tests/LoggerTests.cs Adds tests for the Logger singleton output/files.
WDAC-Policy-Wizard/WDAC-Wizard.Tests/HelperTests.cs Adds tests for helper/validation utilities and EKU encoding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread WDAC-Policy-Wizard/app/src/Policy.cs
Comment thread WDAC-Policy-Wizard/WDAC-Wizard.Tests/PolicyTests.cs Outdated
Comment thread WDAC-Policy-Wizard/WDAC-Wizard.Tests/PolicyTests.cs
Comment thread WDAC-Policy-Wizard/WDAC-Wizard.Tests/HelperTests.cs
Comment thread WDAC-Policy-Wizard/WDAC-Wizard.Tests/HelperTests.cs Outdated
Comment thread WDAC-Policy-Wizard/WDAC-Wizard.Tests/LoggerTests.cs
Comment thread WDAC-Policy-Wizard/app/WDAC Wizard.sln Outdated
Comment thread WDAC-Policy-Wizard/app/Properties/AssemblyInfo.cs
Comment thread WDAC-Policy-Wizard/app/.claude/settings.local.json Outdated
jgeurten and others added 3 commits March 20, 2026 14:22
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

@jgeurten I've opened a new pull request, #511, to work on those changes. Once the pull request is ready, I'll request review from you.

jgeurten and others added 2 commits March 20, 2026 14:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan

* Fix stale comments in UpdateVersion test cases to match actual implementation

Co-authored-by: jgeurten <23045608+jgeurten@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MicrosoftDocs/WDAC-Toolkit/sessions/6c0a8b8c-31b6-4779-b9a7-baa99617b602

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jgeurten <23045608+jgeurten@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 23, 2026

@jgeurten I've opened a new pull request, #512, to work on those changes. Once the pull request is ready, I'll request review from you.

@jgeurten jgeurten merged commit 3097214 into main Mar 23, 2026
1 check passed
@jgeurten jgeurten deleted the add-test-cases branch March 23, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants