-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Issue with DeviceInfo plugin: https://github.com/jamesmontemagno/DeviceInfoPlugin #47
Comments
@Boxer-Property are you hitting a problem? can you post the error message? I have been able to keep this library on 3.5.0.2, as it has been working on any Xamarin.Forms version 3.5 or higher. But if there is a bug, I want to fix it, thanks! |
I have an issue with the testing app. Exception thrown: 'System.NotImplementedException' in Plugin.DeviceInfo.dll This is a class with only static properties and method. ( Yes it should be refactored ) I am setting to static properties, however if I comment out the code the tests run fine. At some point I need to figure out what to do to get around it. |
I'll try and create a test project, but I'm super busy today. |
@Boxer-Property it looks like you are using this plugin, which is where the exception occurs: https://github.com/jamesmontemagno/DeviceInfoPlugin I would guess that a reference assembly is being used here, and it always throws Maybe a more appropriate solution going forward would be for Xamarin.Forms.Mocks also to support Xamarin.Essentials? I would recommend using Xamarin.Essentials in your app instead, but you may hit a similar issue as I haven't tried it. |
Would it not be better to use Xamarin.Essentials.Interfaces and Moq when writing unit tests so that you can mock out anything you need relating to Xamarin.Essentials? With the Xamarin.Essentials classes being static, and taking advantage of switch-and-bait, you will never get the platform (iOS/Android etc.) implementations when running a test project. |
No description provided.
The text was updated successfully, but these errors were encountered: