Improvements on AndroidCarApiTest package.

- Use JUnit4 instead of deprecated JUnit3 Android classe.
- Move common code (like assertMainThread()) to common class.
- Use assertThrows() to check for exceptions.
- Throw exception on tests instead of catching and failing.
- Added missing @Test annotations.
- Change some tests to extend CarApiTestBase
- Removed @RunWith(AndroidJUnit4.class) - these tests can run with JUnit.class
- Other cosmetics changes like using lambda instead of annonymous classes.
- Disabled CarNavigationManagerTest.testSendEvent() as it's not passing

Test: atest AndroidCarApiTest

Fixes: 155477313
Bug: 155447204
Bug: 155343605
Bug: 142554800
Bug: 30839080
Change-Id: I4273ed92c37eae3cd6ad16fa3ae88ea982fc7db8
27 files changed
tree: e54485528e9ab2f8aef33f18df288512d16fe340
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-internal-lib/
  4. car-lib/
  5. car-maps-placeholder/
  6. car-systemtest-lib/
  7. car-test-lib/
  8. car-usb-handler/
  9. car_product/
  10. computepipe/
  11. EncryptionRunner/
  12. evs/
  13. experimental/
  14. FrameworkPackageStubs/
  15. obd2-lib/
  16. procfs-inspector/
  17. service/
  18. surround_view/
  19. tests/
  20. tools/
  21. user/
  22. vehicle-hal-support-lib/
  23. watchdog/
  24. .clang-format
  25. .gitignore
  26. Android.mk
  27. CleanSpec.mk
  28. CPPLINT.cfg
  29. OWNERS
  30. PREUPLOAD.cfg
  31. README.md
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.