Package org.internna.ossmoney.model

Examples of org.internna.ossmoney.model.Dashboard


  @Autowired private UserService service;
  @Autowired private AuthenticationManager authenticationManager;

  @Test
  public void testCreateDashboard() {
    Dashboard dashboard = service.createDashBoDashboard();
    assertNotNull("Dashboard created", dashboard);
    assertNotNull("Dashboard persisted", dashboard.getId());
  }
View Full Code Here


    assertNotNull("Dashboard persisted", dashboard.getId());
  }

  @Test
  public void testCreateUser() throws NoSuchAlgorithmException, UnsupportedEncodingException {
    Dashboard dashboard = service.createDashBoDashboard();
    UserDetails user = service.createUser("foobar", "baz", "Foo Bar", "foo@bar.es", dashboard);
    assertNotNull("User created", user);
    assertEquals("Password encoded", StringUtils.SHA1("finance", "baz"), user.getPassword());
    assertNotNull("Budget created", user.getBudget());
    SecurityUtils.authenticate(authenticationManager, "foobar", "baz");
View Full Code Here

    Subcategory.createInstance("category.supplies", pet, user);
    Subcategory.createInstance("category.veterinarian", pet, user);
  }

  protected Dashboard createDashBoDashboard() {
    Dashboard dashboard = new Dashboard();
    dashboard.setColumns(3);
    dashboard.persist();
    Widget widget = Widget.createInstance("accounts.favorites.title", 1, 1, "/financial/accounts/favorites", null);
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.remainder.title", 1, 2, "/financial/widgets/remainder/", "30");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.networth.title", 1, 3, "/financial/widgets/networth/", "5");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("budget.widget.title", 2, 1, "/financial/budget/graph/", "expanded");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("accounts.expensesbycategory.dashtitle", 2, 2, "/financial/widgets/expenses_by_category/", "last_quarter");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("accounts.expensesovertime.title", 2, 3, "/financial/widgets/expenses_over_time/", "5");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("accounts.incomevsexpenses.title", 3, 1, "/financial/widgets/income_vs_expenses/", "previous_month");
    dashboard.addWidget(widget);
    widget.persist();
    widget = Widget.createInstance("widgets.incomevsexpensesovertime.title", 3, 2, "/financial/widgets/income_vs_expenses_over_time/", "11");
    dashboard.addWidget(widget);
    widget.persist();
    dashboard.merge();
    return dashboard;
  }
View Full Code Here

TOP

Related Classes of org.internna.ossmoney.model.Dashboard

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.