Examples of Organisation


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

  public void testPriceOf() {
   
    CoCampPricingStrategy pricer = new CoCampPricingStrategy();
   
    Event cocamp = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    TestClock testClock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
   
    Booking regularBooking = Booking.create(testUnit, cocamp, testClock);
View Full Code Here

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

  @Test
  public void testCancellation(){
    CoCampPricingStrategy pricer = new CoCampPricingStrategy();
   
    Event cocamp = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    TestClock testClock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
   
    Booking regularBooking = Booking.create(testUnit, cocamp, testClock);
View Full Code Here

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

      }
    }
   
    if(orgKey != null && orgKey.length() > 0)
    {
      Organisation currentOrg = (Organisation)sessionData.get(SessionConstants.CURRENT_ORG);
      if (!currentOrg.getWebKey().equals(orgKey))
      {
        Organisation newOrg = CannedQueries.orgByKey(KeyFactory.stringToKey(orgKey));
        if(newOrg == null)
          throw new IllegalArgumentException("Org matching key "+orgKey+" not found");
       
        //We don't permission by organisation - use unit instead
       
View Full Code Here

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

    TestClock clock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
    Event event = CannedQueries.eventByName( TestConstants.EVENT1_NAME);
    Map<String, Object> session = new HashMap<String, Object>();
    ApplyCoCampDiscountsAction action = createNewAction(clock, event, session);
   
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    Map<Key, List<Booking>> bookings = action.getRelevantBookings(event);
   
    // Should have filtered out "Person booked after earlybird"
View Full Code Here

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

    TestClock clock = new TestClock(TestConstants.DATE_BEFORE_DEADLINE);
    Event event = CannedQueries.eventByName( TestConstants.EVENT1_NAME);
    Map<String, Object> session = new HashMap<String, Object>();
    ApplyCoCampDiscountsAction action = createNewAction(clock, event, session);
   
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    Map<Unit, List<Transaction>> transactions = action.getRelevantTransactions(event);
   
    // Should have filtered out "Person booked after earlybird"
View Full Code Here

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

    assertDetached(unapprovedOrgs);
  }

  @Test
  public void testOrgByName() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");
    assertEquals("Woodcraft Folk", org.getName());
    assertDetached(org);
  }
View Full Code Here

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

    assertDetached(org);
  }
 
  @Test
  public void testOrgByKey() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");
    Key key = org.getKey();
   
    Organisation org2 = CannedQueries.orgByKey(key);
    assertEquals(org, org2);
    assertDetached(org2);
  }
View Full Code Here

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

    assertDetached(org2);
  }
 
  @Test
  public void testUnitsForOrg() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");
   
    Collection<Unit> units = CannedQueries.unitsForOrg(org, true,false);
    TestUtils.assertNames(units, "Unit 1", "Unit 2", "Unapproved unit for wcf");
    assertDetached(units);
View Full Code Here

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

  }

  @Test
  public void testUnitByName() {
   
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Unit unit = CannedQueries.unitByName("Unit 1", org);
    assertEquals("Unit 1", unit.getName());
    assertDetached(unit);
  }
View Full Code Here

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

    assertDetached(unit);
  }

  @Test
  public void testBookingsForUnitAllEvents() {
    Organisation org = CannedQueries.orgByName("Woodcraft Folk");   
    Unit unit = CannedQueries.unitByName("Unit 1", org);
   
    Collection<Booking> bookings = CannedQueries.bookingsForUnitAllEvents(unit);
    TestUtils.assertNames(bookings, "Test person", "Test person 2", "Person booked after earlybird", "Test person in other event");
    assertDetached(bookings);
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.