示例#1
0
  @SuppressWarnings("serial")
  private void initializeDocument() {
    document =
        new Budget() {
          // stub out method to avoid loading Spring and database
          @Override
          public Integer getNextValue(String propertyName) {
            return nextValue++;
          }
        };

    document.add(createBudgetPeriod(1, 2007));
    document.add(createBudgetPeriod(2, 2008));
    document.add(createBudgetPeriod(3, 2009));
    document.add(createBudgetPeriod(4, 2010));
  }
示例#2
0
 @Before
 public void setUp() throws Exception {
   initializeDocument();
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(0), _1K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(1), _2K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(2), _3K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(2), _500));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _4K));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _500));
   document.add(createBudgetProjectIncome(document.getBudgetPeriod(3), _1K));
 }