| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | */ |
| | | |
| | | |
| | |
| | | private final static String TIME_ATTR = "test-time-attribute"; |
| | | |
| | | |
| | | GregorianCalendar cal = null; |
| | | |
| | | /** |
| | | * Ensures that the Directory Server is running before executing the |
| | | * testcases. |
| | |
| | | "objectclasses: ( oc-oid NAME 'testOC' SUP top AUXILIARY MUST test-time-attribute)" |
| | | ); |
| | | assertTrue(resultCode == 0); |
| | | //Get the current time. |
| | | cal = new GregorianCalendar(TimeZone.getTimeZone("UTC")); |
| | | cal.setLenient(false); |
| | | } |
| | | |
| | | |
| | |
| | | populateEntries(); |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | //Get the current time. |
| | | GregorianCalendar cal = |
| | | new GregorianCalendar(TimeZone.getTimeZone("UTC")); |
| | | cal.setLenient(false); |
| | | int month = cal.get(Calendar.MONTH)+1; //month starts from 0 in the Calendar. |
| | | String assertion = cal.get(Calendar.DATE)+"D"+month+"M"; |
| | | |
| | |
| | | @DataProvider(name="partialDateTimeSyntaxes") |
| | | private Object[][] createPartialDateTimeSyntaxes() |
| | | { |
| | | //Get the current time. |
| | | GregorianCalendar cal = |
| | | new GregorianCalendar(TimeZone.getTimeZone("UTC")); |
| | | cal.setLenient(false); |
| | | |
| | | //Get the date today. |
| | | int second = cal.get(Calendar.SECOND); |
| | | int minute = cal.get(Calendar.MINUTE); |