1/* 2 * Copyright (C) 2014 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 com.android.framework.multidexlegacyversionedtestapp; 17 18import android.test.ActivityInstrumentationTestCase2; 19 20/** 21 * Run the tests with: <code>adb shell am instrument -w 22 com.android.framework.multidexlegacyversionedtestapp/android.test.InstrumentationTestRunner 23</code> 24 */ 25public class MultiDexUpdateTest extends ActivityInstrumentationTestCase2<MainActivity> 26{ 27 public MultiDexUpdateTest() { 28 super(MainActivity.class); 29 } 30 31 /** 32 * Tests that all classes of the application can be loaded. Verifies also that we load the 33 * correct version of {@link Version} ie the class is the secondary dex file. 34 */ 35 public void testAllClassAvailable() 36 { 37 assertEquals(2, getActivity().getVersion()); 38 } 39} 40