Search in sources :

Example 6 with DataMap

use of android.icu.dev.test.TestDataModule.DataMap in project j2objc by google.

the class DataDrivenCalendarTest method calendarTest.

/* (non-Javadoc)
     * @see android.icu.dev.test.ModuleTest#processModules()
     */
@Test
@Parameters(method = "getTestData")
public void calendarTest(TestDataPair pair) {
    TestData td = pair.td;
    DataMap settings = pair.dm;
    String type = settings.getString("Type");
    if (type.equals("convert_fwd")) {
        testConvert(td, settings, true);
    } else if (type.equals("convert_rev")) {
        testConvert(td, settings, false);
    } else if (type.equals("ops")) {
        testOps(td, settings);
    } else {
        errln("Unknown type: " + type);
    }
}
Also used : TestData(android.icu.dev.test.TestDataModule.TestData) DataMap(android.icu.dev.test.TestDataModule.DataMap) Parameters(junitparams.Parameters) Test(org.junit.Test) ModuleTest(android.icu.dev.test.ModuleTest)

Aggregations

DataMap (android.icu.dev.test.TestDataModule.DataMap)6 Iterator (java.util.Iterator)4 TestData (android.icu.dev.test.TestDataModule.TestData)3 CalendarFieldsSet (android.icu.dev.test.util.CalendarFieldsSet)3 Calendar (android.icu.util.Calendar)3 ULocale (android.icu.util.ULocale)3 ModuleTest (android.icu.dev.test.ModuleTest)2 Parameters (junitparams.Parameters)2 Test (org.junit.Test)2 DateTimeStyleSet (android.icu.dev.test.util.DateTimeStyleSet)1 DateFormat (android.icu.text.DateFormat)1 SimpleDateFormat (android.icu.text.SimpleDateFormat)1 TimeZone (android.icu.util.TimeZone)1 FieldPosition (java.text.FieldPosition)1 ParsePosition (java.text.ParsePosition)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1