blob: d69b9b832145ff8b99fd41044c45bb0cd61a436d [file] [log] [blame]
/*
* Copyright (C) 2016 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.documentsui.files;
import com.android.documentsui.AbstractActionHandler;
import com.android.documentsui.testing.TestEnv;
import org.mockito.Mockito;
public abstract class TestActivity extends AbstractBase {
public static TestActivity create(TestEnv env) {
TestActivity activity = Mockito.mock(TestActivity.class, Mockito.CALLS_REAL_METHODS);
activity.init(env);
return activity;
}
}
// Trick Mockito into finding our Addons methods correctly. W/o this
// hack, Mockito thinks Addons methods are not implemented.
abstract class AbstractBase extends com.android.documentsui.TestActivity
implements AbstractActionHandler.CommonAddons {}