1 /* 2 * Copyright (C) 2010 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 */ 16 17 package com.android.email; 18 19 import android.content.Context; 20 import android.test.AndroidTestCase; 21 import android.test.suitebuilder.annotation.Suppress; 22 23 /** 24 * Test for {@link NotificationController}. 25 * 26 * TODO Add tests for all methods. 27 */ 28 @Suppress 29 public class NotificationControllerTest extends AndroidTestCase { 30 private Context mProviderContext; 31 private NotificationController mTarget; 32 33 private final MockClock mMockClock = new MockClock(); 34 private int mRingerMode; 35 36 /** 37 * Subclass {@link NotificationController} to override un-mockable operations. 38 */ 39 protected class NotificationControllerForTest extends NotificationController { 40 NotificationControllerForTest(Context context) { 41 super(context, mMockClock); 42 } 43 } 44 45 @Override 46 protected void setUp() throws Exception { 47 super.setUp(); 48 mProviderContext = DBTestHelper.ProviderContextSetupHelper.getProviderContext(mContext); 49 mTarget = new NotificationControllerForTest(mProviderContext); 50 } 51 52 // the ringtone and vibration flags are depracated and the method that we use 53 // to test notification has been removed in 54 // https://googleplex-android-review.googlesource.com/#/c/271237/ 55 } 56