-
Notifications
You must be signed in to change notification settings - Fork 216
Integrate CI unit testing #122
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
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… data more flexible
Now all the set methods of advertising data parameters return a bool value. This bool indicates whether the parameter has been correctly set or not, depending on the size of the passed value. A remaining length parameter of advertising data has been introduced. It can be publicly read, it indicates how many bytes can be still written into the packet.
In BLELocalDevice constructor, the flags field of the advertising data is set to a default value. If a new advertising data is passed to BLELocalDevice, then: if it has no flags -> default flags are set (if there is enough space) if it already has flags -> nothing happens, the already set flags are used
Add raw data class. When an AdvertisingData object has a rawData parameter set, the only advertised data will be the rawData parameter itself.
If the new value for the parameter is not valid, because too large, then the old value will remain the actual value of the parameter.
This change is needed for mocking BLE classes in the CI environment
This change allows fake classes to override methods during unit testing.
This change allows to implement and use fake objects during unit testing Classes to be mocked will be extended by fake classes. Each fake class will define a fake singleton instance
Each class under test will have a dedicated test file. Each test file is placed in a dedicated folder in extras/test/src . Such dedicated folder will also contain the mock (Fake) objects needed by the test. Finally, an executable file will be generated for each test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Each class under test will have a dedicated test file.
Each test file is placed in a dedicated folder in
extras/test/src
. Such dedicated folder will also contain the mock (Fake) objects needed by the test.Finally, an executable file will be generated for each test.
Steps to build tests:
Generated binaries will be placed in
extras/test/build/bin
integrates and overwrites #121