1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package android.car.hardware.property; 17 18 import static com.google.common.truth.Truth.assertThat; 19 20 import android.car.VehicleAreaWindow; 21 22 import androidx.test.filters.SmallTest; 23 24 import com.android.compatibility.common.util.ApiTest; 25 26 import org.junit.Test; 27 28 @SmallTest 29 public final class VehicleWindowUnitTest { 30 31 @Test 32 @ApiTest(apis = {"android.car.VehicleAreaWindow#WINDOW_FRONT_WINDSHIELD", 33 "android.car.VehicleAreaWindow#WINDOW_REAR_WINDSHIELD", 34 "android.car.VehicleAreaWindow#WINDOW_ROW_1_LEFT", 35 "android.car.VehicleAreaWindow#WINDOW_ROW_1_RIGHT", 36 "android.car.VehicleAreaWindow#WINDOW_ROW_2_LEFT", 37 "android.car.VehicleAreaWindow#WINDOW_ROW_2_RIGHT", 38 "android.car.VehicleAreaWindow#WINDOW_ROW_3_LEFT", 39 "android.car.VehicleAreaWindow#WINDOW_ROW_3_RIGHT", 40 "android.car.VehicleAreaWindow#WINDOW_ROOF_TOP_1", 41 "android.car.VehicleAreaWindow#WINDOW_ROOF_TOP_2"}) testMatchWithVehicleHal()42 public void testMatchWithVehicleHal() { 43 assertThat(VehicleAreaWindow.WINDOW_FRONT_WINDSHIELD).isEqualTo( 44 android.hardware.automotive.vehicle.VehicleAreaWindow.FRONT_WINDSHIELD); 45 assertThat(VehicleAreaWindow.WINDOW_REAR_WINDSHIELD).isEqualTo( 46 android.hardware.automotive.vehicle.VehicleAreaWindow.REAR_WINDSHIELD); 47 assertThat(VehicleAreaWindow.WINDOW_ROW_1_LEFT) 48 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_1_LEFT); 49 assertThat(VehicleAreaWindow.WINDOW_ROW_1_RIGHT) 50 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_1_RIGHT); 51 assertThat(VehicleAreaWindow.WINDOW_ROW_2_LEFT) 52 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_2_LEFT); 53 assertThat(VehicleAreaWindow.WINDOW_ROW_2_RIGHT) 54 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_2_RIGHT); 55 assertThat(VehicleAreaWindow.WINDOW_ROW_3_LEFT) 56 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_3_LEFT); 57 assertThat(VehicleAreaWindow.WINDOW_ROW_3_RIGHT) 58 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROW_3_RIGHT); 59 assertThat(VehicleAreaWindow.WINDOW_ROOF_TOP_1) 60 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROOF_TOP_1); 61 assertThat(VehicleAreaWindow.WINDOW_ROOF_TOP_2) 62 .isEqualTo(android.hardware.automotive.vehicle.VehicleAreaWindow.ROOF_TOP_2); 63 } 64 } 65