328N/A/*
328N/A * CDDL HEADER START
328N/A *
328N/A * The contents of this file are subject to the terms of the
328N/A * Common Development and Distribution License, Version 1.0 only
328N/A * (the "License"). You may not use this file except in compliance
328N/A * with the License.
328N/A *
328N/A * You can obtain a copy of the license at
328N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
328N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
328N/A * See the License for the specific language governing permissions
328N/A * and limitations under the License.
328N/A *
328N/A * When distributing Covered Code, include this CDDL HEADER in each
328N/A * file and include the License file at
328N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
328N/A * add the following below this CDDL HEADER, with the fields enclosed
873N/A * by brackets "[]" replaced with your own identifying information:
328N/A * Portions Copyright [yyyy] [name of copyright owner]
328N/A *
328N/A * CDDL HEADER END
328N/A *
328N/A *
3232N/A * Copyright 2006-2008 Sun Microsystems, Inc.
328N/A */
328N/Apackage org.opends.server.schema;
328N/A
328N/Aimport org.opends.server.api.OrderingMatchingRule;
328N/Aimport org.testng.annotations.DataProvider;
328N/A
328N/A/**
328N/A * Test the GeneralizedTimeOrderingMatchingRule.
328N/A */
328N/Apublic class GeneralizedTimeOrderingMatchingRuleTest extends
328N/A OrderingMatchingRuleTest
328N/A{
328N/A
328N/A /**
328N/A * {@inheritDoc}
328N/A */
328N/A @Override
328N/A @DataProvider(name="OrderingMatchingRuleInvalidValues")
328N/A public Object[][] createOrderingMatchingRuleInvalidValues()
328N/A {
328N/A return new Object[][] {
328N/A { "20060912180130"},
328N/A {"2006123123595aZ"},
328N/A {"200a1231235959Z"},
328N/A {"2006j231235959Z"},
328N/A {"20061231#35959Z"},
328N/A {"20060912180a30Z"},
328N/A {"20060912180030Z.01"},
328N/A {"200609121800"},
328N/A {"20060912180129.hhZ"},
328N/A {"20060912180129.1hZ"},
328N/A {"20060906135030+aa01"},
328N/A {"2006"},
1139N/A {"20060906135030+3359"},
1139N/A {"20060906135030+2389"},
1139N/A {"20060906135030+2361"},
328N/A {"20060906135030+"},
328N/A {"20060906135030+0"},
328N/A {"20060906135030+010"},
328N/A };
328N/A }
328N/A
328N/A /**
328N/A * {@inheritDoc}
328N/A */
328N/A @Override
328N/A @DataProvider(name="Orderingmatchingrules")
328N/A public Object[][] createOrderingMatchingRuleTestData()
328N/A {
328N/A return new Object[][] {
328N/A {"20060906135030+0101", "20060906135030+2359", 1},
328N/A {"20060912180130Z", "20060912180130Z", 0},
328N/A {"20060912180130Z", "20060912180129Z", 1},
328N/A {"20060912180129Z", "20060912180130Z", -1},
328N/A {"20060912180129.000Z", "20060912180130.001Z", -1},
328N/A {"20060912180129.1Z", "20060912180130.2Z", -1},
328N/A {"20060912180129.11Z", "20060912180130.12Z", -1},
328N/A };
328N/A }
328N/A
328N/A /**
328N/A * {@inheritDoc}
328N/A */
328N/A @Override
2342N/A protected OrderingMatchingRule getRule()
328N/A {
328N/A return new GeneralizedTimeOrderingMatchingRule();
328N/A }
328N/A
328N/A}