j0j00 / flutter_user_agent

Retrieve Android/iOS device user agents in Flutter.
https://pub.dev/packages/flutter_user_agent
BSD 2-Clause "Simplified" License
25 stars 56 forks source link

test environemnt #13

Closed horam-deriv closed 4 years ago

horam-deriv commented 4 years ago

Hi, i am busy coding tests for my app in which I need to mock flutter_uesr_agent. the problem is that after its initialization in blocTest function, when I want to have access one of the properties, it gives me MissingPluginException(No implementation found for method getProperties on channel flutter_user_agent) error. Do I miss something here?

j0j00 commented 4 years ago

It's hard to give a concrete answer since you haven't provided enough details relating to the cause e.g. a stack trace or platform you're running it on. How you're testing (is it running on a device or not) etc.

This doesn't sound like an issue with the library, and most likely something to do with how you're running your tests. I'd recommend posting to stackoverflow instead of posting here.

The GitHub issues are typically for opening bug reports or feature requests as I do maintain this project in my spare time as a hobby and this seems like a general development question.

I'm not as involved in Flutter as I previously was, and I haven't delved in testing in Flutter. My intuition is telling me that you're probably trying to run the tests on a device (not Android/iOS) which is why it's complaining about a missing plugin implementation.

If not, you can set up a debugger and see what the code is doing, and then if you find that there's an issue with the code, feel free to open a ticket/pull request addressing the problem.