Java 类org.apache.hadoop.hbase.constraint.TestConstraint.CheckWasRunConstraint 实例源码

项目:ditb    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table"));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:LCIndex-HBase-0.94.16    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:pbase    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table"));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:HIndex    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table"));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:IRIndex    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:hbase    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 *
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(name.getMethodName()));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:PyroDB    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table"));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:c5    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor(TableName.valueOf("table"));
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:HBase-Research    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:hbase-0.94.8-qod    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:hbase-0.94.8-qod    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:DominoHBase    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}
项目:hindex    文件:TestConstraints.java   
/**
 * Test that when we update a constraint the ordering is not modified.
 * 
 * @throws Exception
 */
@SuppressWarnings("unchecked")
@Test
public void testUpdateConstraint() throws Exception {
  HTableDescriptor desc = new HTableDescriptor("table");
  Constraints.add(desc, CheckConfigurationConstraint.class,
      CheckWasRunConstraint.class);
  Constraints.setConfiguration(desc, CheckConfigurationConstraint.class,
      CheckConfigurationConstraint.getConfiguration());

  List<? extends Constraint> constraints = Constraints.getConstraints(desc,
      this.getClass().getClassLoader());

  assertEquals(2, constraints.size());

  // check to make sure the order didn't change
  assertEquals(CheckConfigurationConstraint.class, constraints.get(0)
      .getClass());
  assertEquals(CheckWasRunConstraint.class, constraints.get(1).getClass());
}