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
873N/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 *
3232N/A * Copyright 2006-2008 Sun Microsystems, Inc.
299N/A */
299N/Apackage org.opends.server.schema;
299N/A
299N/Aimport org.opends.server.api.EqualityMatchingRule;
299N/Aimport org.opends.server.schema.BooleanEqualityMatchingRuleTest;
299N/Aimport org.testng.annotations.DataProvider;
299N/A
299N/A/**
299N/A * Test the BooleanEqualityMatchingRule.
299N/A */
299N/Apublic class BooleanEqualityMatchingRuleTest extends 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 {"TRUE", "true", true},
299N/A {"YES", "true", true},
299N/A {"ON", "true", true},
299N/A {"1", "true", true},
299N/A {"FALSE", "false", true},
299N/A {"NO", "false", true},
299N/A {"OFF", "false", true},
299N/A {"0", "false", true},
299N/A {"TRUE", "false", 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 {"garbage"},
299N/A };
299N/A }
299N/A
299N/A /**
299N/A * {@inheritDoc}
299N/A */
299N/A @Override
2342N/A protected EqualityMatchingRule getRule()
299N/A {
299N/A return new BooleanEqualityMatchingRule();
299N/A }
299N/A
299N/A}