-
-
Notifications
You must be signed in to change notification settings - Fork 26
Add unit test for AndroidSensorEventListener #45
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
Add unit test for AndroidSensorEventListener #45
Conversation
MubarakNative
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
robolectric latest version should be: this, also don't mock context mockkStatic("android.content.Context")
06377d6 to
d2dd26e
Compare
Done |
Issue: #44
Problem: No unit test for AndroidSensorEventListener
Solution: Add unit test for AndroidSensorEventListener.
1. onSensorChanged should update accelerometer and magnetometer readings and call updateOrientationAngles
2. onAccuracyChanged should show toast when accuracy is unreliable
3. onAccuracyChanged should show toast when accuracy is low.
4. updateOrientationAngles should call listener with correct values
5. registerSensor should register listeners
6. unregisterSensorListener should unregister listeners
7. setAzimuthListener should set the listener
d2dd26e to
9cd84c1
Compare
|
Is all test cases are passes ? |
Yes |
|
@MubarakNative, is there anything I did wrong? |
|
@j0ker70 Definetly not! Sorry for that if you feel bad, I am currently working on another project i have a nomeantime to review the all test cases and write my own test cases for classes like these ToDegree, CardinalDirection. So i planned to work this PR later, so i close this PR. Now it is open! If you want to be a part of this app, I will also add you as a collaborator/maintainer (invite you to this project) |
|
Thank you so much for the opportunity. I accepted your invitation although I don't know much of the workings of this app. I will have to spend some time to understand the workings of the app. |
Nothing too fancy here, install the latest version of this app, Checkout its feature according to the codebase |
Issue: #44
Problem: No unit test for AndroidSensorEventListener
Solution: Add unit test for AndroidSensorEventListener.