-
Notifications
You must be signed in to change notification settings - Fork 588
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
Mock callbacks #707
Mock callbacks #707
Conversation
…rite operations via callbacks
# Conflicts: # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMock.java # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleDeviceMock.java
1 failing, not sure why…
This is now complete and is just waiting for other PRs to be approved. |
# Conflicts: # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMock.java
# Conflicts: # mockrxandroidble/README.md # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMock.java # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleConnectionMock.java # mockrxandroidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleDeviceMock.java # mockrxandroidble/src/test/groovy/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMockTest.groovy
Again merged |
...androidble/src/main/java/com/polidea/rxandroidble2/mockrxandroidble/RxBleConnectionMock.java
Outdated
Show resolved
Hide resolved
I wanted to override the method in the base interface to rename a parameter. Looks like this can’t be done, so I just removed the base interfaces.
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.
The biggest issue I see is the package naming. I think that tests could be more clear on what they test and how they are structured. Actual implementation is 💯
...a/com/polidea/rxandroidble2/mockrxandroidble/Callbacks/Results/RxBleGattWriteResultMock.java
Outdated
Show resolved
Hide resolved
...oidble/src/test/groovy/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMockTest.groovy
Outdated
Show resolved
Hide resolved
...oidble/src/test/groovy/com/polidea/rxandroidble2/mockrxandroidble/RxBleClientMockTest.groovy
Outdated
Show resolved
Hide resolved
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.
Awesome! Sorry for the delay — I got totally swamped by other work.
This PR is based on PR #706 and enhances the functionality provided by
RxBleConnectionMock
to allow the user to provide callbacks to handle characteristic and descriptor read and write.Tests added, however one is failing and it's a bit too late on a Friday for my frazzled brain to figure out! Help would be appreciated.
I also need to update the readme. Otherwise complete.