-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add unit tests #61
Add unit tests #61
Conversation
For #48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few small comments/questions, looks good!
Tests/CommunityToolkit.Labs.UnitTests.Uwp/CommunityToolkit.Labs.UnitTests.Uwp.csproj
Outdated
Show resolved
Hide resolved
Labs/CanvasLayout/tests/Labs.WinUI.CanvasLayout.Tests/ExampleCanvasLayoutTestClass.cs
Outdated
Show resolved
Hide resolved
Also, we should investigate running the All-up solution tests in the CI too. Want that to be a separate issue or part of this PR as well? |
…s.UnitTests.Uwp.csproj Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
to "CanvasLayout.Tests"
.../CanvasLayout/Tests/CanvasLayout.UnitTests.WinAppSdk/CanvasLayout.UnitTests.WinAppSdk.csproj
Outdated
Show resolved
Hide resolved
and remove folder as will only eve have a single item in it.
@@ -0,0 +1,179 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just thinking we may want to abstract the files here like we did for the other heads so we can update dependency versions and SDKs globally. We can do this after though as part of the template as we move forward. I figure once we're all set, we'll reset this experiment with the template to make sure everything is consistent and working.
Labs/CanvasLayout/tests/CanvasLayout.UnitTests.Uwp/CanvasLayout.UnitTests.Uwp.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM w/ our notes on the future improvements, let's add checkboxes in the #48 issue to track:
- CI
- Shared Props
* Add unit tests For CommunityToolkit#48 * Update Tests/CommunityToolkit.Labs.UnitTests.Uwp/CommunityToolkit.Labs.UnitTests.Uwp.csproj Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com> * Standardize casing of directory names * shorten "Labs.WinUI.CanvasLayout.Tests" to "CanvasLayout.Tests" * Shorten experiment test project name * removed duplicated default Windows app assets * Remove non-essential assets from test projects * Share Asset files in the test host projects * test projects to use common/shared asset files * standardize XAML formatting * Do not set passive flag if not running xstyler passively * remove experiment specific sample heads from "All" solution and remove folder as will only eve have a single item in it. * remove unneeded experiment head project from WASM solution * update test related package dependencies Co-authored-by: Michael Hawker MSFT (XAML Llama) <24302614+michael-hawker@users.noreply.github.com>
…ndencies/system.collections.immutable- Remove System.Collections.Immutable dependency where not needed
This addresses the Unit Test goals for #48
The use of wildcard includes for the actual tests into the central projects in the "All" solution greatly simplifies dependencies between tests for individual experiments and having them all accessible in one place (for CI simplicity.)
However, I have noticed this reference mysteriously disappear several times. I'm putting this down to tooling limitations when working with sharedprojects (as I've seen similarly unexplainable behavior when working with shared projects elsewhere.)
For this reason, I have added comments in the relevant
.csproj
files in the hope that a diff of any changes to those files helps highlight any possible future issues. Reasons to modify the affected files should be exceedingly rare and so I hope this won't be a recurring issue.