Merge "Fix SettingsRoboTests build error with OpenJDK 9" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6a3bac39bf
@@ -73,13 +73,13 @@ public class TimeZoneDataTest {
|
||||
CountryTimeZones US = mock(CountryTimeZones.class);
|
||||
when(US.getCountryIso()).thenReturn("us");
|
||||
when(US.getTimeZoneMappings()).thenReturn(Arrays.asList(
|
||||
new CountryTimeZones.TimeZoneMapping("Unknown/Secret_City", true),
|
||||
new CountryTimeZones.TimeZoneMapping("Unknown/Secret_City2", false)
|
||||
TimeZoneMapping.createForTests("Unknown/Secret_City", true),
|
||||
TimeZoneMapping.createForTests("Unknown/Secret_City2", false)
|
||||
));
|
||||
CountryTimeZones GB = mock(CountryTimeZones.class);
|
||||
when(GB.getCountryIso()).thenReturn("gb");
|
||||
when(GB.getTimeZoneMappings()).thenReturn(Collections.singletonList(
|
||||
new TimeZoneMapping("Unknown/Secret_City", true)
|
||||
TimeZoneMapping.createForTests("Unknown/Secret_City", true)
|
||||
));
|
||||
when(mCountryZonesFinder.lookupCountryTimeZonesForZoneId("Unknown/Secret_City"))
|
||||
.thenReturn(Arrays.asList(US, GB));
|
||||
|
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package libcore.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Empty implementation of CountryTimeZones for Robolectric test.
|
||||
*/
|
||||
public class CountryTimeZones {
|
||||
public CountryTimeZones() {
|
||||
}
|
||||
|
||||
public final static class TimeZoneMapping {
|
||||
public final String timeZoneId;
|
||||
public final boolean showInPicker;
|
||||
|
||||
public TimeZoneMapping(String timeZoneId, boolean showInPicker) {
|
||||
this.timeZoneId = timeZoneId;
|
||||
this.showInPicker = showInPicker;
|
||||
}
|
||||
}
|
||||
|
||||
public List<TimeZoneMapping> getTimeZoneMappings() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getCountryIso() {
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package libcore.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Empty implementation of CountryZonesFinder for Robolectric test.
|
||||
*/
|
||||
public class CountryZonesFinder {
|
||||
public CountryZonesFinder(List<CountryTimeZones> countryTimeZonesList) {}
|
||||
|
||||
public List<String> lookupAllCountryIsoCodes() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<CountryTimeZones> lookupCountryTimeZonesForZoneId(String zoneId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public CountryTimeZones lookupCountryTimeZones(String countryIso) {
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user