Package uk.org.woodcraft.bookings.utils

Examples of uk.org.woodcraft.bookings.utils.TestClock


  }
 
  @Test
  public void testGenerateDiscounts()
  {
    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);
   
    action.generateDiscounts();
View Full Code Here


  }
 
  @Test
  public void testConfirmDiscounts()
  {   
    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);
    action.generateDiscounts();
   
View Full Code Here

  @Override
  protected List<Booking> getBookings(Event event1, Event event2,  Unit unit1, Unit unit2, Unit unapprovedWcfUnit, Unit otherOrgUnit2) {
   
    List<Booking> bookings = new ArrayList<Booking>();
    TestClock testClock = new TestClock(DATE_BEFORE_EARLY_DEADLINE);
   
    // Before earlybird deadline
    Booking b = Booking.create("Test person", unit1, event1, testClock);
    b.setEmail("email@example.com");
    bookings.add(b);
   
    bookings.add(Booking.create("Test person 2", unit1, event1,testClock));
    bookings.add(Booking.create("Test person in unit 2", unit2, event1,testClock));
    bookings.add(Booking.create("Second person in unit 2", unit2, event1,testClock));
   
    bookings.add(Booking.create("Person in unapproved, homeless unit", unapprovedWcfUnit, event1, testClock));
    bookings.add(Booking.create("Person in other org", otherOrgUnit2, event1, testClock));
    bookings.add(Booking.create("Test person in other event", unit1, event2, testClock));
   
    // After earlybird deadline
    TestClock afterEarlyBird = new TestClock(DATE_BEFORE_DEADLINE);   
    bookings.add(Booking.create("Person booked after earlybird", unit1, event1, afterEarlyBird));
   
    // After booking deadline
    TestClock afterBookingDeadline = new TestClock(DATE_AFTER_DEADLINE_BEFORE_AMMENDMENT);
    bookings.add(Booking.create("Person booked after booking deadline", unit1, event1, afterBookingDeadline));
   
    // After event start
    TestClock afterEventStart = new TestClock(DATE_AFTER_EVENT_START);
    bookings.add(Booking.create("Person booked after booking deadline", unit1, event1, afterEventStart));   
    return bookings;
  }
View Full Code Here

TOP

Related Classes of uk.org.woodcraft.bookings.utils.TestClock

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.