feat(AssertionLibrary): Add assertion library choice to templates#1659
feat(AssertionLibrary): Add assertion library choice to templates#1659DevTKSS wants to merge 13 commits intounoplatform:mainfrom
Conversation
…sed default to none
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new assertion library selection feature for Uno templates, addressing the commercial licensing changes in FluentAssertions v8.0. The change enables users to choose between FluentAssertions, Shouldly, or no assertion library when creating new projects from templates.
- Adds an
assertionLibraryparameter to template configurations with three options: none, Shouldly, and FluentAssertions - Refactors existing templates to conditionally include assertion libraries based on user selection
- Updates global usings and test files to support multiple assertion library choices
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.template.config/template.json |
Adds assertion library choice parameter and computed symbols |
.template.config/dotnetcli.host.json |
Exposes assertion library parameter to CLI |
.template.config/TemplateWizard.json |
Integrates assertion library selection into Visual Studio wizard |
*.csproj |
Conditionally includes assertion library package references |
GlobalUsings.cs |
Conditionally imports assertion library namespaces |
AppInfoTests.cs |
Implements conditional assertion logic for different libraries |
Directory.Build.targets |
Adds Shouldly version configuration |
Uno.Templates.csproj |
Adds Shouldly version replacement logic |
src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Tests/AppInfoTests.cs
Outdated
Show resolved
Hide resolved
src/Uno.Templates/content/unolib-uitest/UnoUITestsLibrary.csproj
Outdated
Show resolved
Hide resolved
src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Tests/AppInfoTests.cs
Outdated
Show resolved
Hide resolved
src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Tests/AppInfoTests.cs
Outdated
Show resolved
Hide resolved
src/Uno.Templates/content/unoapp/MyExtensionsApp.1.Tests/AppInfoTests.cs
Outdated
Show resolved
Hide resolved
src/Uno.Templates/content/unoapp/.template.config/TemplateWizard.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hi @jeromelaban, If you have a moment, could you let me know whether this is still on the backlog or if any changes are needed on my side? Thanks! |
GitHub Issue (If applicable): closes #1607
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Creating a new Project from template, will always include FluentAssertions Package, which is up from v8.0 commercial and paid.
for more information about the reason this should be made available to activly select, see the linked issues.
What is the new behavior?
This PR should enable us users to activly choose IF and WHICH assertion Library we want to use.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Partially about Parent issue of 1607 : #1605
@MartinZikmund @jeromelaban
Its likly, as this is my first time with dotnet templates, that there will be some issues made so would be great to get some help ❤️ I tryed my best to follow the templating wiki of the CLI
Would add an xUnit Testing project option at some later point in a seperate PR to improve it for #1258
This PR needs help on:
as there is no schema for the TemplateWizard.json available, I would assume, that uses a internal flow. I added a Property "NestedIn" for the assertionLibrary symbols, but would need someone from the team to implement or update this. Maybe if it is a own schema you are using (and this file is overall used) it would be great if you could add such schema reference in the repository
Internal Issue (If applicable):