Home | History | Annotate | Download | only in tests
      1 /*
      2  * Copyright (C) 2014 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.inputmethod.keyboard.layout.tests;
     18 
     19 import android.test.suitebuilder.annotation.SmallTest;
     20 
     21 import com.android.inputmethod.keyboard.layout.LayoutBase;
     22 import com.android.inputmethod.keyboard.layout.Qwerty;
     23 import com.android.inputmethod.keyboard.layout.Symbols;
     24 import com.android.inputmethod.keyboard.layout.SymbolsShifted;
     25 import com.android.inputmethod.keyboard.layout.customizer.EnglishCustomizer;
     26 import com.android.inputmethod.keyboard.layout.expected.ExpectedKey;
     27 
     28 import java.util.Locale;
     29 
     30 /*
     31  * en_IN: English (India)/qwerty
     32  */
     33 @SmallTest
     34 public final class TestsEnglishIN extends TestsEnglishUS {
     35     private static final Locale LOCALE = new Locale("en", "IN");
     36     private static final LayoutBase LAYOUT = new Qwerty(new EnglishINCustomizer(LOCALE));
     37 
     38     @Override
     39     LayoutBase getLayout() { return LAYOUT; }
     40 
     41     private static class EnglishINCustomizer extends EnglishCustomizer {
     42         EnglishINCustomizer(final Locale locale) { super(locale); }
     43 
     44         @Override
     45         public ExpectedKey getCurrencyKey() { return CURRENCY_RUPEE; }
     46 
     47         @Override
     48         public ExpectedKey[] getOtherCurrencyKeys() {
     49             return SymbolsShifted.CURRENCIES_OTHER_GENERIC;
     50         }
     51 
     52         // U+20B9: "" INDIAN RUPEE SIGN
     53         private static final ExpectedKey CURRENCY_RUPEE = key("\u20B9",
     54             Symbols.CURRENCY_GENERIC_MORE_KEYS);
     55     }
     56 }
     57