Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Unit Test including Page

$
0
0

I'm trying to Unit Test an object which uses a Xamarin.Forms.Page and so I (think I) have to mock the Page. I've installed Moq as the mocking framework.

The problem is that creating a mocked Page object is calling the Page's InitializeComponent in the corresponding generated partial class.

How do I avoid this? Is there a way of creating a Page object that's fully mocked?


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>