Package org.pau.assetmanager.viewmodel.grouping

Examples of org.pau.assetmanager.viewmodel.grouping.AnnotationDateYearlyGroupingModel


      List<Annotation> annotationsExpectedToBeUsedInYearly) {
    YearlyReportViewModel yearlyReportViewModel = new YearlyReportViewModel();
    yearlyReportViewModel.updateBookSelection(BookSelection
        .fromBook(propertyBook));
    yearlyReportViewModel.setYearlyReportYear(2012);
    AnnotationDateYearlyGroupingModel annotationsDateYearlyGroupingModel = yearlyReportViewModel
        .getAnnotationsDateYearlyGroupingModel();
    Integer numberOfGroups = annotationsDateYearlyGroupingModel
        .getGroupCount();
    // we expect 1 property (the one selected)
    Assert.assertEquals(new Integer(1), numberOfGroups);
    for (Integer currentProperty = 0; currentProperty < numberOfGroups; currentProperty++) {
      List<Annotation> annotationsForProperty = new LinkedList<Annotation>();
      for (Integer annotationIndex = 0; annotationIndex < annotationsDateYearlyGroupingModel
          .getChildCount(currentProperty); annotationIndex++) {
        Annotation currentAnnotation = annotationsDateYearlyGroupingModel.getChild(
            currentProperty, annotationIndex);
        annotationsForProperty.add(currentAnnotation);
      }
      Assert.assertTrue(annotationsForProperty
          .containsAll(annotationsExpectedToBeUsedInYearly));
View Full Code Here


      List<Annotation> annotationsExpectedToBeUsedInYearly) {
    YearlyReportViewModel yearlyReportViewModel = new YearlyReportViewModel();
    yearlyReportViewModel.updateBookSelection(BookSelection
        .fromBook(propertyBook));
    yearlyReportViewModel.setYearlyReportYear(2012);
    AnnotationDateYearlyGroupingModel annotationsDateYearlyGroupingModel = yearlyReportViewModel
        .getAnnotationsDateYearlyGroupingModel();
    Integer numberOfGroups = annotationsDateYearlyGroupingModel
        .getGroupCount();
    // we expect 1 property (the one selected)
    Assert.assertEquals(new Integer(1), numberOfGroups);
    for (Integer currentProperty = 0; currentProperty < numberOfGroups; currentProperty++) {
      List<Annotation> annotationsForProperty = new LinkedList<Annotation>();
      for (Integer annotationIndex = 0; annotationIndex < annotationsDateYearlyGroupingModel
          .getChildCount(currentProperty); annotationIndex++) {
        Annotation currentAnnotation = annotationsDateYearlyGroupingModel.getChild(
            currentProperty, annotationIndex);
        annotationsForProperty.add(currentAnnotation);
      }
      Assert.assertTrue(annotationsForProperty
          .containsAll(annotationsExpectedToBeUsedInYearly));
View Full Code Here

  }


  @DependsOn({ "selectedBook", "yearlyReportYear" })
  public AnnotationDateYearlyGroupingModel getAnnotationsDateYearlyGroupingModel() {
    return new AnnotationDateYearlyGroupingModel(getAnnotations(bookSelection, yearlyReportYear),
        new AnnotationDateYearlyComparator(), true);
  }
View Full Code Here

TOP

Related Classes of org.pau.assetmanager.viewmodel.grouping.AnnotationDateYearlyGroupingModel

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.