Skip to content
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

Tests #128

Open
bdlukaa opened this issue Jul 17, 2023 · 2 comments
Open

Tests #128

bdlukaa opened this issue Jul 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@bdlukaa
Copy link
Collaborator

bdlukaa commented Jul 17, 2023

Some errors are sneaky (like #127) and lead to unexpected crashes. These errors and crashes could be easily avoided with unit tests. In the future, widget testing could also be implemented.

Additional context

@bdlukaa bdlukaa added the enhancement New feature or request label Jul 17, 2023
@bdlukaa bdlukaa moved this to Todo in Bluecherry Unity Aug 24, 2023
@bdlukaa bdlukaa moved this from Todo to In Progress in Bluecherry Unity Dec 2, 2023
@bdlukaa
Copy link
Collaborator Author

bdlukaa commented Dec 8, 2023

Added the Flutter Analysis/tests workflow. Now, every test under the test folder will run on every pull-request, merge or release.

@bdlukaa bdlukaa moved this from In Progress to Todo in Bluecherry Unity Mar 6, 2024
@bdlukaa
Copy link
Collaborator Author

bdlukaa commented May 9, 2024

Some of the unit tests are:

  • API
    • checkServerCredentials
      • Version Mismatch error
      • Successful response
    • getDevices
    • getEvents
    • ptz
  • Downloads
    • Correctly read persisted values
    • Default download directory returns the correct value
    • Download event if its file doesn't exist on initialization
    • Correctly download event file
    • Correctly delete an event and its file
    • Correctly cancel a ongoing download
  • Settings
    • Correctly persist data
    • Correctly read persisted data
  • Other
    • Correctly convert timezone-aware dates
    • Find the correct device on List<Server>.findDevice(<id>)
    • Correctly sort Iterable<Device>.sorted according to the parameters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant