How to test methods and command having Navigation.PushAsync

Shiva799Shiva799 Member ✭✭

Hi,
My test cases fails on Naviagtion.PushAsync method. these navigation is directed to next views and not viewmodels and the error is thrown in the xaml.g.cs files of the view. I.e. for example i want to navigate to add page
so i write Navigation.PushAsync(new Add());
and error is thrown in Add.xaml.g.cs pages.
Is there any thing that im missing? I have also implemented the methods shown in the website
https://brianlagunas.com/mocking-and-unit-testing-the-xamarin-forms-application-class/
Thanks

Best Answer

Answers

  • Shiva799Shiva799 Member ✭✭

    Thanks it worked

Sign In or Register to comment.