VehicleDoorTest.java revision 4e0a51caf13270b9d70af2b211bf5f0f6275b117
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 */
16package android.car.apitest;
17
18import android.car.VehicleDoor;
19import android.test.AndroidTestCase;
20import android.test.suitebuilder.annotation.SmallTest;
21
22import com.android.car.vehiclenetwork.VehicleNetworkConsts;
23
24@SmallTest
25public class VehicleDoorTest extends AndroidTestCase {
26
27    public void testMatchWithVehicleHal() {
28        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_HOOD, VehicleDoor.DOOR_HOOD);
29        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_REAR, VehicleDoor.DOOR_REAR);
30        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_1_LEFT,
31                VehicleDoor.DOOR_ROW_1_LEFT);
32        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_1_RIGHT,
33                VehicleDoor.DOOR_ROW_1_RIGHT);
34        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_2_LEFT,
35                VehicleDoor.DOOR_ROW_2_LEFT);
36        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_2_RIGHT,
37                VehicleDoor.DOOR_ROW_2_RIGHT);
38        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_3_LEFT,
39                VehicleDoor.DOOR_ROW_3_LEFT);
40        assertEquals(VehicleNetworkConsts.VehicleDoor.VEHICLE_DOOR_ROW_3_RIGHT,
41                VehicleDoor.DOOR_ROW_3_RIGHT);
42    }
43}
44