unity icon indicating copy to clipboard operation
unity copied to clipboard

Tests

Open bdlukaa opened this issue 2 years ago • 2 comments

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 avatar Jul 17 '23 16:07 bdlukaa

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

bdlukaa avatar Dec 08 '23 21:12 bdlukaa

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

bdlukaa avatar May 09 '24 17:05 bdlukaa