From c19be0527ca0f60ae7a2077f98cb2bd7d2d5f4a4 Mon Sep 17 00:00:00 2001 From: Neal Nguyen Date: Wed, 23 Dec 2009 16:30:36 -0800 Subject: [PATCH] Framework Tests Cleanup: Removing CTS duplicate files NeighboringCellInfoTest.java is already included in CTS, so removing this one under frameworks. --- .../unit_tests/NeighboringCellInfoTest.java | 79 ------------------- 1 file changed, 79 deletions(-) delete mode 100644 tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java diff --git a/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java b/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java deleted file mode 100644 index 7252aa95fabf2..0000000000000 --- a/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.unit_tests; - -import android.os.Parcel; -import android.test.AndroidTestCase; -import android.telephony.NeighboringCellInfo; -import android.test. suitebuilder.annotation.SmallTest; - -import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN; -import static android.telephony.TelephonyManager.NETWORK_TYPE_EDGE; -import static android.telephony.TelephonyManager.NETWORK_TYPE_GPRS; -import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS; - -public class NeighboringCellInfoTest extends AndroidTestCase { - @SmallTest - public void testConstructor() { - int rssi = 31; - NeighboringCellInfo nc; - - nc = new NeighboringCellInfo(rssi, "FFFFFFF", NETWORK_TYPE_EDGE); - assertEquals(NETWORK_TYPE_EDGE, nc.getNetworkType()); - assertEquals(rssi, nc.getRssi()); - assertEquals(0xfff, nc.getLac()); - assertEquals(0xffff, nc.getCid()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc()); - - nc = new NeighboringCellInfo(rssi, "1FF", NETWORK_TYPE_UMTS); - assertEquals(NETWORK_TYPE_UMTS, nc.getNetworkType()); - assertEquals(rssi, nc.getRssi()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getCid()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getLac()); - assertEquals(0x1ff, nc.getPsc()); - - nc = new NeighboringCellInfo(rssi, "1FF", NETWORK_TYPE_UNKNOWN); - assertEquals(NETWORK_TYPE_UNKNOWN, nc.getNetworkType()); - assertEquals(rssi, nc.getRssi()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getCid()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getLac()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc()); - } - - @SmallTest - public void testParcel() { - int rssi = 20; - - NeighboringCellInfo nc = new NeighboringCellInfo(rssi, "12345678", NETWORK_TYPE_GPRS); - assertEquals(NETWORK_TYPE_GPRS, nc.getNetworkType()); - assertEquals(rssi, nc.getRssi()); - assertEquals(0x1234, nc.getLac()); - assertEquals(0x5678, nc.getCid()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc()); - - Parcel p = Parcel.obtain(); - p.setDataPosition(0); - nc.writeToParcel(p, 0); - - p.setDataPosition(0); - NeighboringCellInfo nw = new NeighboringCellInfo(p); - assertEquals(NETWORK_TYPE_GPRS, nw.getNetworkType()); - assertEquals(rssi, nw.getRssi()); - assertEquals(0x1234, nw.getLac()); - assertEquals(0x5678, nw.getCid()); - assertEquals(NeighboringCellInfo.UNKNOWN_CID, nw.getPsc()); - } -}