Package org.nasutekds.server.replication.plugin

Examples of org.nasutekds.server.replication.plugin.AttrValueHistorical


    // Check add(AttributeValue val, ChangeNumber CN)
    attrInfo1.add(att, updateTime);
    ArrayList<AttrValueHistorical> values1 = attrInfo1.getValuesHistorical();
    assertTrue(values1.size() == 1);
    AttrValueHistorical valueInfo1 = new AttrValueHistorical(att, updateTime, null);
    assertTrue(values1.get(0).equals(valueInfo1));

    // Check constructor with parameter
    AttrValueHistorical valueInfo2 = new AttrValueHistorical(att, updateTime, deleteTime);
    ArrayList<AttrValueHistorical> values = new ArrayList<AttrValueHistorical>();
    values.add(valueInfo2);
    AttrHistoricalMultiple attrInfo2 = new AttrHistoricalMultiple(deleteTime, updateTime, values);

    // Check equality
    //assertTrue(attrInfo1.getDeleteTime().compareTo(attrInfo2.getDeleteTime())==0);

    //  Check constructor with time parameter and not Value
    AttrHistoricalMultiple attrInfo3 = new AttrHistoricalMultiple(deleteTime, updateTime, null);
    attrInfo3.add(att, updateTime);
    ArrayList<AttrValueHistorical> values3 = attrInfo3.getValuesHistorical();
    assertTrue(values3.size() == 1);
    valueInfo1 = new AttrValueHistorical(att, updateTime, null);
    assertTrue(values3.get(0).equals(valueInfo1));

    // Check duplicate
    AttrHistoricalMultiple attrInfo4 = attrInfo3.duplicate();
    ArrayList<AttrValueHistorical> values4 = attrInfo4.getValuesHistorical();
View Full Code Here


      ChangeNumber CNupdate,
      ChangeNumber CNdelete)
         throws Exception
  {
    AttributeType type = DirectoryServer.getAttributeType("description");
    AttrValueHistorical valInfo1 = new AttrValueHistorical(value,CNupdate,CNdelete);
    AttrValueHistorical valInfo2 = new AttrValueHistorical(value,CNupdate,CNupdate);
    AttrValueHistorical valInfo3 = new AttrValueHistorical(AttributeValues.create(type,"Test"),
        CNupdate,CNupdate);

    // Check equals
    assertFalse(valInfo1.equals(new Object())) ;
    assertTrue(valInfo1.equals(valInfo1)) ;
View Full Code Here

TOP

Related Classes of org.nasutekds.server.replication.plugin.AttrValueHistorical

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.