11379df175a8ff337bae4d98da87219dda721012cBrett Chabot/* 21379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Copyright (C) 2013 The Android Open Source Project 31379df175a8ff337bae4d98da87219dda721012cBrett Chabot * 41379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Licensed under the Apache License, Version 2.0 (the "License"); 51379df175a8ff337bae4d98da87219dda721012cBrett Chabot * you may not use this file except in compliance with the License. 61379df175a8ff337bae4d98da87219dda721012cBrett Chabot * You may obtain a copy of the License at 71379df175a8ff337bae4d98da87219dda721012cBrett Chabot * 81379df175a8ff337bae4d98da87219dda721012cBrett Chabot * http://www.apache.org/licenses/LICENSE-2.0 91379df175a8ff337bae4d98da87219dda721012cBrett Chabot * 101379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Unless required by applicable law or agreed to in writing, software 111379df175a8ff337bae4d98da87219dda721012cBrett Chabot * distributed under the License is distributed on an "AS IS" BASIS, 121379df175a8ff337bae4d98da87219dda721012cBrett Chabot * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 131379df175a8ff337bae4d98da87219dda721012cBrett Chabot * See the License for the specific language governing permissions and 141379df175a8ff337bae4d98da87219dda721012cBrett Chabot * limitations under the License. 151379df175a8ff337bae4d98da87219dda721012cBrett Chabot */ 16a9407644f9c2d397b473b45775991cffcafa192fBrett Chabotpackage android.support.test; 171379df175a8ff337bae4d98da87219dda721012cBrett Chabot 181379df175a8ff337bae4d98da87219dda721012cBrett Chabotimport android.os.Bundle; 191379df175a8ff337bae4d98da87219dda721012cBrett Chabot 201379df175a8ff337bae4d98da87219dda721012cBrett Chabotimport junit.framework.TestCase; 211379df175a8ff337bae4d98da87219dda721012cBrett Chabot 221379df175a8ff337bae4d98da87219dda721012cBrett Chabot/** 231379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Implement this interface to receive a {@link Bundle} containing the command line arguments 241379df175a8ff337bae4d98da87219dda721012cBrett Chabot * passed to the test runner into your JUnit3 test. 251379df175a8ff337bae4d98da87219dda721012cBrett Chabot * <p/> 261379df175a8ff337bae4d98da87219dda721012cBrett Chabot * The test runner will call {@link #injectBundle(Bundle)} after 271379df175a8ff337bae4d98da87219dda721012cBrett Chabot * object construction but before any {@link TestCase#setUp()} methods are called. 281379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Note the order in which injectBundle is called vs other inject methods is not defined. 291379df175a8ff337bae4d98da87219dda721012cBrett Chabot * <p/> 301379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Declaring this in a JUnit4 test will have no effect. Use {@link InjectBundle} instead. 311379df175a8ff337bae4d98da87219dda721012cBrett Chabot */ 321379df175a8ff337bae4d98da87219dda721012cBrett Chabotpublic interface BundleTest { 331379df175a8ff337bae4d98da87219dda721012cBrett Chabot 341379df175a8ff337bae4d98da87219dda721012cBrett Chabot /** 351379df175a8ff337bae4d98da87219dda721012cBrett Chabot * Called by Android test runner to pass in Bundle containing command line arguments. 361379df175a8ff337bae4d98da87219dda721012cBrett Chabot */ 371379df175a8ff337bae4d98da87219dda721012cBrett Chabot public void injectBundle(Bundle bundle); 381379df175a8ff337bae4d98da87219dda721012cBrett Chabot} 39