DirectoryStringFirstComponentEqualityMatchingRuleTest.java revision 299
299N/A/*
299N/A * CDDL HEADER START
299N/A *
299N/A * The contents of this file are subject to the terms of the
299N/A * Common Development and Distribution License, Version 1.0 only
299N/A * (the "License"). You may not use this file except in compliance
299N/A * with the License.
299N/A *
299N/A * You can obtain a copy of the license at
299N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
299N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
299N/A * See the License for the specific language governing permissions
299N/A * and limitations under the License.
299N/A *
299N/A * When distributing Covered Code, include this CDDL HEADER in each
299N/A * file and include the License file at
299N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
299N/A * add the following below this CDDL HEADER, with the fields enclosed
299N/A * by brackets "[]" replaced with your own identifying * information:
299N/A * Portions Copyright [yyyy] [name of copyright owner]
299N/A *
299N/A * CDDL HEADER END
299N/A *
299N/A *
299N/A * Portions Copyright 2006 Sun Microsystems, Inc.
299N/A */
299N/Apackage org.opends.server.schema;
299N/A
299N/Aimport org.opends.server.api.EqualityMatchingRule;
299N/Aimport org.testng.annotations.DataProvider;
299N/A
299N/A/**
299N/A * Test the DirectoryStringFirstComponentEqualityMatchingRule.
299N/A */
299N/Apublic class DirectoryStringFirstComponentEqualityMatchingRuleTest extends
299N/A EqualityMatchingRuleTest
299N/A{
299N/A
299N/A /**
299N/A * {@inheritDoc}
299N/A */
299N/A @Override
299N/A @DataProvider(name= "equalitymatchingrules")
299N/A public Object[][] createEqualityMatchingRuleTest()
299N/A {
299N/A return new Object[][] {
299N/A {"(1.2.8.5 NAME 'testtype' DESC 'full type')", "1.2.8.5", true},
299N/A {"(1.2.8.5 NAME 'testtype' DESC 'full type')", "something", false},
299N/A };
299N/A }
299N/A
299N/A /**
299N/A * {@inheritDoc}
299N/A */
299N/A @Override
299N/A @DataProvider(name= "equalityMatchingRuleInvalidValues")
299N/A public Object[][] createEqualityMatchingRuleInvalidValues()
299N/A {
299N/A return new Object[][] {};
299N/A }
299N/A
299N/A /**
299N/A * {@inheritDoc}
299N/A */
299N/A @Override
299N/A public EqualityMatchingRule getRule()
299N/A {
299N/A return new DirectoryStringFirstComponentEqualityMatchingRule();
299N/A }
299N/A}