Browse Source
Merge in ~LIDONGY/base-third from ~AFLY/base-third:release/10.0 to release/10.0 * commit '0d5259925799519c4947666ffe7127a7b7644d54': DEC-16125 fix: 少了一个GMT+12,third包单元测试跑不到,移到decisionrelease/10.0
Afly
4 years ago
2 changed files with 1 additions and 35 deletions
@ -1,35 +0,0 @@ |
|||||||
package com.fr.third.joda.time.tz; |
|
||||||
|
|
||||||
import org.junit.Test; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.lang.reflect.InvocationTargetException; |
|
||||||
import java.lang.reflect.Method; |
|
||||||
|
|
||||||
import static org.junit.Assert.*; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author Afly |
|
||||||
* created on 2020-12-16 |
|
||||||
*/ |
|
||||||
public class ZoneInfoProviderTest { |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testGetResource() throws IOException, NoSuchMethodException { |
|
||||||
ZoneInfoProvider zoneInfoProvider = new ZoneInfoProvider(); |
|
||||||
assertNotNull(zoneInfoProvider.getZone("Etc/GMT+8")); |
|
||||||
Method openResource = zoneInfoProvider.getClass().getDeclaredMethod("openResource", String.class); |
|
||||||
openResource.setAccessible(true); |
|
||||||
try { |
|
||||||
openResource.invoke(zoneInfoProvider, "Etc/Exception+8"); |
|
||||||
fail(); |
|
||||||
} catch (Exception ignored) { |
|
||||||
} |
|
||||||
|
|
||||||
try { |
|
||||||
openResource.invoke(zoneInfoProvider, "Etc/Exception-8"); |
|
||||||
fail(); |
|
||||||
} catch (Exception ignored) { |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue