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 NumericStringOrderingMatchingRule.
328N/A */
328N/Apublic class NumericStringOrderingMatchingRuleTest 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 {"jfhslur"},
328N/A {"123AB"},
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 {"1", "999999999999999999999", -1},
328N/A {"1", "9", -1},
328N/A {"1", " 1 ", 0},
328N/A {"0", "1", -1},
328N/A {"1", "0", 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 NumericStringOrderingMatchingRule();
328N/A }
328N/A
328N/A}