summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2015-12-16 23:36:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-12-16 23:36:48 +0000
commit5192538b2e44fe8810e82bd4e7ae7daaa10f57e2 (patch)
tree76c0ac6815eef00074e4faefff2ca170301ed1fb /tests
parent19b6d5f0176cacb46725951faa707b6dd35695b1 (diff)
parent9264eaecf70946a4df118cc2a1240aa1006c9019 (diff)
downloadandroid_packages_apps_ContactsCommon-5192538b2e44fe8810e82bd4e7ae7daaa10f57e2.tar.gz
android_packages_apps_ContactsCommon-5192538b2e44fe8810e82bd4e7ae7daaa10f57e2.tar.bz2
android_packages_apps_ContactsCommon-5192538b2e44fe8810e82bd4e7ae7daaa10f57e2.zip
Merge "Added utility method to check for classes at runtime" into ub-contactsdialer-b-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/contacts/common/compat/CompatUtilsTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/src/com/android/contacts/common/compat/CompatUtilsTest.java b/tests/src/com/android/contacts/common/compat/CompatUtilsTest.java
new file mode 100644
index 00000000..566a8313
--- /dev/null
+++ b/tests/src/com/android/contacts/common/compat/CompatUtilsTest.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2015 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.contacts.common.compat;
+
+import android.test.AndroidTestCase;
+
+public class CompatUtilsTest extends AndroidTestCase {
+
+ public void testClassAvailable() {
+ assertTrue(CompatUtils.isClassAvailable(CompatUtils.class.getName()));
+ }
+
+ public void testClassNotAvailable() {
+ assertFalse(CompatUtils.isClassAvailable("com.android.contacts.common.NonexistantClass"));
+ }
+}