Home | History | Annotate | Download | only in duration
      1 /* GENERATED SOURCE. DO NOT MODIFY. */
      2 //  2016 and later: Unicode, Inc. and others.
      3 // License & terms of use: http://www.unicode.org/copyright.html#License
      4 /*
      5 ******************************************************************************
      6 * Copyright (C) 2007-2010, International Business Machines Corporation and   *
      7 * others. All Rights Reserved.                                               *
      8 ******************************************************************************
      9 */
     10 
     11 // Copyright 2006 Google Inc.  All Rights Reserved.
     12 
     13 package android.icu.dev.test.duration;
     14 
     15 import java.util.Collection;
     16 import java.util.Iterator;
     17 
     18 import org.junit.Test;
     19 import org.junit.runner.RunWith;
     20 import org.junit.runners.JUnit4;
     21 
     22 import android.icu.dev.test.TestFmwk;
     23 import android.icu.impl.duration.impl.PeriodFormatterData;
     24 import android.icu.impl.duration.impl.ResourceBasedPeriodFormatterDataService;
     25 import android.icu.testsharding.MainTestShard;
     26 
     27 @MainTestShard
     28 @RunWith(JUnit4.class)
     29 public class ResourceBasedPeriodFormatterDataServiceTest extends TestFmwk {
     30   @Test
     31   public void testAvailable() {
     32     ResourceBasedPeriodFormatterDataService service =
     33         ResourceBasedPeriodFormatterDataService.getInstance();
     34     Collection locales = service.getAvailableLocales();
     35     for (Iterator i = locales.iterator(); i.hasNext();) {
     36       String locale = (String)i.next();
     37       PeriodFormatterData pfd = service.get(locale);
     38       assertFalse(locale + ": " + pfd.pluralization(), -1 == pfd.pluralization());
     39     }
     40   }
     41 }
     42