ExperimentsTest.java revision 3dfa929b24f38ac7836450176d88ceab41dc6ac5
1/* 2 * Copyright (C) 2016 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 17package com.android.tv.experiments; 18 19import android.support.test.filters.SmallTest; 20 21import com.android.tv.common.BuildConfig; 22 23import junit.framework.Assert; 24import junit.framework.TestCase; 25 26import java.lang.reflect.Field; 27import java.lang.reflect.Modifier; 28import java.util.ArrayList; 29import java.util.List; 30 31/** 32 * Tests for {@link Experiments}. 33 */ 34@SmallTest 35public class ExperimentsTest extends TestCase { 36 37 @Override 38 protected void setUp() throws Exception { 39 super.setUp(); 40 ExperimentFlag.initForTest(); 41 } 42 43 44 public void testEngOnlyDefault() { 45 assertEquals("ENABLE_DEVELOPER_FEATURES", Boolean.valueOf(BuildConfig.ENG), 46 Experiments.ENABLE_DEVELOPER_FEATURES.get()); 47 } 48 49 50} 51