Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@renefloor
Copy link
Contributor

@renefloor renefloor commented Mar 18, 2021

This PR makes a start with unit tests for IAP on Android. Having a folder and some example tests will help other developers add unit tests for new changes.

Starts flutter/flutter#78538

I didn't change the pubspec of changelog as nothing really changed, so I don't think a new release is needed.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@nt4f04uNd
Copy link
Member

Starts to fix flutter/flutter#78538

beware that with such syntax this pr will close the mentioned issue

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've already have similar tests in https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/example/android/app/src/test/java/io/flutter/plugins/inapppurchase/MethodCallHandlerTest.java

Why did we need this tests? (I didn't look into details of the implementation of the tests, but I assume they are mostly testing the same thing).

@renefloor
Copy link
Contributor Author

@cyanglaz sorry my bad. I looked for tests, but couldn't find them. I expected the tests to be in in_app_purchase/android/src instead of in_app_purchase/example/android/src. Should they be in example or should we move them to the source of the plugin? For example path_provider has them in the package folder: https://github.com/flutter/plugins/tree/master/packages/path_provider/path_provider/android/src

@cyanglaz
Copy link
Contributor

cyanglaz commented Mar 18, 2021

@renefloor
I talked to @mvanbeusekom offline. I think we can move the tests to android/ if possible.

@renefloor
Copy link
Contributor Author

@cyanglaz I made PR #3732. Tomorrow I'll check if I can still use any of these new test and otherwise close this PR.

@stuartmorgan-g
Copy link
Contributor

Sounds like this is obsolete as-is; I'm going to close it, but you can always pull code out into a new PR (or re-open) if there are tests here that need to be added once the existing tests are moved.

@mvanbeusekom mvanbeusekom deleted the iap_setup_android_tests branch September 21, 2021 09:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants