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

How to implement unit test project for maui class library? #2112

Closed
KarthikRajaAKR opened this issue Aug 15, 2021 · 6 comments
Closed

How to implement unit test project for maui class library? #2112

KarthikRajaAKR opened this issue Aug 15, 2021 · 6 comments
Labels
area-templates Project templates, Item Templates for Blazor and MAUI

Comments

@KarthikRajaAKR
Copy link

Is there any documentation or sample available for creating unit test project for Maui under android and ios platforms?

@pictos
Copy link
Contributor

pictos commented Aug 15, 2021

Hey, @brminnick do you have any tips to share?

@brminnick
Copy link
Contributor

I don't.

We're hitting the same problem ourselves trying to unit test the .NET MAUI Toolkit.

👇 Gerald commented on this issue. I'm hoping for a fix.
microsoft/vstest#2985 (comment)

@Daniellled
Copy link

This also appears to be an issue on Windows too - #2594

@Eilon Eilon added the area-templates Project templates, Item Templates for Blazor and MAUI label Oct 18, 2021
@Eilon
Copy link
Member

Eilon commented Oct 18, 2021

Might be nice to have a template for this in the future, but there's a recent PR that, once merged, also includes a small test project sample:

https://github.com/dotnet/maui/pull/3017/files

@jayveedee
Copy link

Anyone figure out how to do this? Or is it not possible as of yet?

@brminnick
Copy link
Contributor

brminnick commented Mar 20, 2022

Anyone figure out how to do this? Or is it not possible as of yet?

Hi @jayveedee! This Issue was resolved months ago (and should be closed).

For the .NET MAUI Community Toolkit, we wrote our Unit Test suite in net6.0 using Xunit. The project is open source and you can see how we've implemented our Unit Tests here: https://github.com/CommunityToolkit/Maui/tree/main/src/CommunityToolkit.Maui.UnitTests

@Eilon Eilon closed this as completed Mar 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates Project templates, Item Templates for Blazor and MAUI
Projects
None yet
Development

No branches or pull requests

6 participants