Xamarin.Forms.TestingLibrary icon indicating copy to clipboard operation
Xamarin.Forms.TestingLibrary copied to clipboard

How to correctly match the Forms mocked engine with the user's version?

Open akamud opened this issue 4 years ago • 0 comments

Today we reference Forms 5.0+ (mainly because of LocalValueEntry, introduced in 5.0). So when we run the unit tests, the app is running on our selected Forms version, and not on the user's app version.

If the user is referencing, for example, Forms 4.8, this could lead to some false positives or false negatives, since the Forms engine in the unit tests (5.0) is different from the App's original version (4.8).

I'm not sure how to handle this difference other than release a version matching every single stable Forms release. A few observations with this approach:

  • This could be done, but in order to support 5.0- we should stop using LocalValueEntry, which is not something I'm sure I want to do.
  • How could the versioning be made in order to make this clear for people referencing the library?
  • What would this mean for the Xamarin.Forms.Mock reference? How would it behave since it reference Forms too?

akamud avatar Jan 02 '21 15:01 akamud