Examples of Organisation


Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    assertDetached(bookings);
  }
 
  @Test
  public void testBookingsForUnit() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Unit unit = CannedQueries.unitByName("Unit 1", org);
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    Collection<Booking> bookings = CannedQueries.bookingsForUnit(unit, event1);
    TestUtils.assertNames(bookings, "Test person", "Test person 2","Person booked after earlybird");
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  }

  public Collection<Organisation> getAllOrgs()
  {
    Collection<Organisation> orgs = CannedQueries.allOrgs(false, false);
    Organisation userAddedOrg = (Organisation)getSessionObject(SessionConstants.SIGNUP_ADDED_ORG);
    if (userAddedOrg != null) {
      orgs.add(userAddedOrg);
    }
   
    return orgs;
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    return orgs;
  }

  public Collection<Unit> getUnitsForCurrentOrg()
  {
    Organisation currentOrg = (Organisation)getSessionObject(SessionConstants.SIGNUP_ORG);
   
    Collection<Unit> units = new ArrayList<Unit>();
    if (currentOrg != null) units = CannedQueries.unitsForOrg(currentOrg.getKey(), false, false);
    Unit userAddedUnit = (Unit)getSessionObject(SessionConstants.SIGNUP_ADDED_UNIT);
    if (userAddedUnit != null && currentOrg != null && userAddedUnit.getOrganisationKey().equals(currentOrg.getKey())) {
      units.add(userAddedUnit);
    }
    return units;
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    assertDetached(bookings);
  }
 
  @Test
  public void testBookingsForOrg() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    Collection<Booking> bookings = CannedQueries.bookingsForOrg(org, event1);
    TestUtils.assertNames(bookings, "Test person", "Test person 2","Person booked after earlybird", "Test person in unit 2", "Second person in unit 2");
    assertDetached(bookings);
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    if (getModel() == null)
    {
      User user = new User();
      user.setIsNew(true);
     
      Organisation selectedOrg = (Organisation)getSessionObject(SessionConstants.SIGNUP_ORG);
      if (selectedOrg != null)
        user.setOrganisationKey(selectedOrg.getKey());
     
      Unit selectedUnit = (Unit)getSessionObject(SessionConstants.SIGNUP_UNIT);
      if (selectedUnit != null)
        user.setUnitKey(selectedUnit.getKey());
     
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    assertDetached(bookings);
  }
 
  @Test
  public void testBookingsForLargeOrg() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    List<Unit> testUnits = new ArrayList<Unit>(50);
    List<Booking> testBookings = new ArrayList<Booking>(50);
    List<String> testNames = new ArrayList<String>(52);
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  }
 
  @SkipValidation
  public String signupOrg() {
    if (organisationKey == null) return INPUT;
    Organisation org = CannedQueries.orgByKey(organisationKey);
    if (org == null) return INPUT;
    setSessionObject(SessionConstants.SIGNUP_ORG, org);
    return SUCCESS;
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    users = CannedQueries.allUnapprovedUsers();
    TestUtils.assertNames(users, "Unassigned 1");
    assertDetached(users);
   
   
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    users = CannedQueries.allUsersForOrg(org);
    TestUtils.assertNames(users, "Global Admin 1", "Org Admin 1", "Unit Admin 1", "Unassigned 1");
    assertDetached(users);
 
    Unit unit = CannedQueries.unitByName("Unit 1", org);   
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  }
 
  @Test
  public void testTransactionsForUnit() {
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME)
    Organisation org = CannedQueries.orgByName("Woodcraft Folk")
    Unit unit = CannedQueries.unitByName("Unit 1", org);
   
    Collection<Transaction> transactions = CannedQueries.transactionsForUnit(unit, event1);
    TestUtils.assertNames(transactions, "Payment 1", "Payment 2", "Payment 3", "Refund 1", "Payment after earlybird","Discount for early payment");
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    TestUtils.assertNames(transactions, "Payment 1", "Payment 2", "Payment 3","Refund 1", "Payment after earlybird","Discount for early payment", "Unit 2 payment");
  }
 
  @Test
  public void testTransactionsForLargeOrg() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Event event1 = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
   
    List<Unit> testUnits = new ArrayList<Unit>(50);
    List<Transaction> testTransactions = new ArrayList<Transaction>(100);
    List<String> testTransNames = new ArrayList<String>(103);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.