()
| 992 | } |
| 993 | |
| 994 | @Test |
| 995 | public void unitsToCalendarType() { |
| 996 | assertEquals(Calendar.MILLISECOND, DateTime.unitsToCalendarType("ms")); |
| 997 | assertEquals(Calendar.SECOND, DateTime.unitsToCalendarType("s")); |
| 998 | assertEquals(Calendar.MINUTE, DateTime.unitsToCalendarType("m")); |
| 999 | assertEquals(Calendar.HOUR_OF_DAY, DateTime.unitsToCalendarType("h")); |
| 1000 | assertEquals(Calendar.DAY_OF_MONTH, DateTime.unitsToCalendarType("d")); |
| 1001 | assertEquals(Calendar.DAY_OF_WEEK, DateTime.unitsToCalendarType("w")); |
| 1002 | assertEquals(Calendar.MONTH, DateTime.unitsToCalendarType("n")); |
| 1003 | assertEquals(Calendar.YEAR, DateTime.unitsToCalendarType("y")); |
| 1004 | try { |
| 1005 | DateTime.unitsToCalendarType("j"); |
| 1006 | fail("Expected IllegalArgumentException"); |
| 1007 | } catch (IllegalArgumentException e) { } |
| 1008 | try { |
| 1009 | DateTime.unitsToCalendarType(null); |
| 1010 | fail("Expected IllegalArgumentException"); |
| 1011 | } catch (IllegalArgumentException e) { } |
| 1012 | try { |
| 1013 | DateTime.unitsToCalendarType(""); |
| 1014 | fail("Expected IllegalArgumentException"); |
| 1015 | } catch (IllegalArgumentException e) { } |
| 1016 | } |
| 1017 | |
| 1018 | |
| 1019 | @Test |
nothing calls this directly
no test coverage detected