1 /* 2 * Copyright (C) 2011 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.contacts.calllog; 18 19 import static junit.framework.Assert.assertEquals; 20 21 import android.provider.CallLog.Calls; 22 23 import junit.framework.Assert; 24 25 /** 26 * Helper class to create test values for {@link CallLogQuery}. 27 */ 28 public class CallLogQueryTestUtils { 29 public static Object[] createTestValues() { 30 Object[] values = new Object[]{ 31 0L, "", 0L, 0L, Calls.INCOMING_TYPE, "", "", "", null, 0, null, null, null, null, 32 0L, null, 0, 33 }; 34 assertEquals(CallLogQuery._PROJECTION.length, values.length); 35 return values; 36 } 37 38 public static Object[] createTestExtendedValues() { 39 Object[] values = new Object[]{ 40 0L, "", 0L, 0L, Calls.INCOMING_TYPE, "", "", "", null, 0, null, null, null, null, 41 0L, null, 1, CallLogQuery.SECTION_OLD_ITEM 42 }; 43 Assert.assertEquals(CallLogQuery.EXTENDED_PROJECTION.length, values.length); 44 return values; 45 } 46 } 47