Add CTS tests for seat height properties
Test: atest CarPropertyManagerTest
Bug: 239613431
Change-Id: I095be6f28aa204cc4660cf3d5dd63666e79fabf7
diff --git a/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java b/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
index 8bb9eba..ae41f03 100644
--- a/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
+++ b/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
@@ -1563,6 +1563,45 @@
}
@Test
+ @ApiTest(apis = {"android.car.hardware.property.CarPropertyManager#getCarPropertyConfig",
+ "android.car.hardware.property.CarPropertyManager#getProperty",
+ "android.car.hardware.property.CarPropertyManager#setProperty",
+ "android.car.hardware.property.CarPropertyManager#registerCallback",
+ "android.car.hardware.property.CarPropertyManager#unregisterCallback"})
+ public void testSeatHeightPosIfSupported() {
+ adoptSystemLevelPermission(Car.PERMISSION_CONTROL_CAR_SEATS, () -> {
+ VehiclePropertyVerifier.newBuilder(VehiclePropertyIds.SEAT_HEIGHT_POS,
+ CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ_WRITE,
+ VehicleAreaType.VEHICLE_AREA_TYPE_SEAT,
+ CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
+ Integer.class).requireMinMaxValues().build()
+ .verify(mCarPropertyManager);
+ });
+ }
+
+ @Test
+ @ApiTest(apis = {"android.car.hardware.property.CarPropertyManager#getCarPropertyConfig",
+ "android.car.hardware.property.CarPropertyManager#getProperty",
+ "android.car.hardware.property.CarPropertyManager#setProperty",
+ "android.car.hardware.property.CarPropertyManager#registerCallback",
+ "android.car.hardware.property.CarPropertyManager#unregisterCallback"})
+ public void testSeatHeightMoveIfSupported() {
+ adoptSystemLevelPermission(Car.PERMISSION_CONTROL_CAR_SEATS, () -> {
+ VehiclePropertyVerifier.newBuilder(VehiclePropertyIds.SEAT_HEIGHT_MOVE,
+ CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ_WRITE,
+ VehicleAreaType.VEHICLE_AREA_TYPE_SEAT,
+ CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
+ Integer.class).requireMinMaxValues()
+ .requireZeroToBeContainedInMinMaxRanges().build().verify(mCarPropertyManager);
+ });
+ }
+
+ @Test
+ @ApiTest(apis = {"android.car.hardware.property.CarPropertyManager#getCarPropertyConfig",
+ "android.car.hardware.property.CarPropertyManager#getProperty",
+ "android.car.hardware.property.CarPropertyManager#setProperty",
+ "android.car.hardware.property.CarPropertyManager#registerCallback",
+ "android.car.hardware.property.CarPropertyManager#unregisterCallback"})
public void testHvacDefrosterIfSupported() {
adoptSystemLevelPermission(Car.PERMISSION_CONTROL_CAR_CLIMATE, () -> {
VehiclePropertyVerifier.newBuilder(VehiclePropertyIds.HVAC_DEFROSTER,