Package uk.co.blackpepper.shadowtail.data

Examples of uk.co.blackpepper.shadowtail.data.StatisticGroup


    final ManagedStatisticGroup group = new ManagedStatisticGroup();
    final ManagedStatisticGroup parent = new ManagedStatisticGroup();

    group.setParent(parent);

    final StatisticGroup retrieved = group.getParent();
    assertNotNull("Retrieved parent value was null.", retrieved);
    assertSame("Retrieved parent is not the one that was expected.", parent,
        retrieved);
  }
View Full Code Here


    final ManagedStatisticGroup parent2 = new ManagedStatisticGroup();
    final ManagedStatisticGroup child = new ManagedStatisticGroup();
   
    child.setParent(null);
   
    StatisticGroup retrieved = child.getParent();
    assertNull("Parent is not null", retrieved);

    child.setParent(parent1);

    retrieved = child.getParent();
View Full Code Here

   *
   * @param workingGroup The current group being worked on.
   * @param buffer The String buffer.
   */
  private void appendGroups(final StatisticGroup workingGroup, final StringBuffer buffer) {
    final StatisticGroup parent = workingGroup.getParent();
    if (parent != null) {
      appendGroups(parent, buffer);
    }
    buffer.append(File.separator).append(escapeFileName(workingGroup.getName()));   
  }
View Full Code Here

  public void testInit() {
    logger.setGroup(group1);
    logger.setFileFactory(fileFactory);
    logger.init();

    StatisticGroup group = fileFactory.getStatisticGroup();
    assertSame("Expected groups to be same object.", group1, group);
  }
View Full Code Here

    if (group == null || fileFactory == null) {
      throw new IllegalStateException("Required objects have not been injected.");
    }

    // check that the fileFactory's group is an ancestor of this group
    StatisticGroup fileFactoryGroup = fileFactory.getStatisticGroup();
    if (fileFactoryGroup.isAncestor(group)) {
      fileFactory.setStatisticGroup(group);
    }
    else {
      throw new IllegalStateException("StatisticGroup objects are inconsistent.");
    }
View Full Code Here

   *
   * @param workingGroup The current group being worked on.
   * @param buffer The String buffer.
   */
  private void appendGroups(final StatisticGroup workingGroup, final StringBuffer buffer) {
    final StatisticGroup parent = workingGroup.getParent();
    if (parent != null) {
      appendGroups(parent, buffer);
    }
    buffer.append(File.separator).append(escapeFileName(workingGroup.getName()));   
  }
View Full Code Here

    if (group == null || fileFactory == null) {
      throw new IllegalStateException("Required objects have not been injected.");
    }

    // check that the fileFactory's group is an ancestor of this group
    StatisticGroup fileFactoryGroup = fileFactory.getStatisticGroup();
    if (fileFactoryGroup.isAncestor(group)) {
      fileFactory.setStatisticGroup(group);
    }
    else {
      throw new IllegalStateException("StatisticGroup objects are inconsistent.");
    }
View Full Code Here

  public void testInit() {
    logger.setGroup(group1);
    logger.setFileFactory(fileFactory);
    logger.init();

    StatisticGroup group = fileFactory.getStatisticGroup();
    assertSame("Expected groups to be same object.", group1, group);
  }
View Full Code Here

    final ManagedStatisticGroup group = new ManagedStatisticGroup();
    final ManagedStatisticGroup parent = new ManagedStatisticGroup();

    group.setParent(parent);

    final StatisticGroup retrieved = group.getParent();
    assertNotNull("Retrieved parent value was null.", retrieved);
    assertSame("Retrieved parent is not the one that was expected.", parent,
        retrieved);
  }
View Full Code Here

    final ManagedStatisticGroup parent2 = new ManagedStatisticGroup();
    final ManagedStatisticGroup child = new ManagedStatisticGroup();
   
    child.setParent(null);
   
    StatisticGroup retrieved = child.getParent();
    assertNull("Parent is not null", retrieved);

    child.setParent(parent1);

    retrieved = child.getParent();
View Full Code Here

TOP

Related Classes of uk.co.blackpepper.shadowtail.data.StatisticGroup

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.