test_class.file: booking/src/test/java/org/koenighotze/jee7hotel/booking/business/ReservationCostCalculatorTest.java
test_class.identifier: ReservationCostCalculatorTest
test_case.body: @Test
      public void calcRate() {
          LocalDate from = of(1976, SEPTEMBER, 8);
          LocalDate to = of(1976, SEPTEMBER, 12);
          BigDecimal rate = new ReservationCostCalculator().calculateRateFor(BUDGET, from, to);
          assertThat(rate).isEqualTo(BigDecimal.valueOf(240L));
      }
test_case.class_method_signature: ReservationCostCalculatorTest.calcRate()
test_case.full_signature: @Test public void calcRate()
test_case.identifier: calcRate
test_case.invocations: of of calculateRateFor isEqualTo assertThat valueOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void calcRate()
focal_class.file: booking/src/main/java/org/koenighotze/jee7hotel/booking/business/ReservationCostCalculator.java
focal_class.identifier: ReservationCostCalculator
focal_class.class_method_signature: ReservationCostCalculator.calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_class.full_signature: public BigDecimal calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_class.identifier: calculateRateFor
focal_class.modifiers: public
focal_class.parameters: (RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_class.return: BigDecimal
focal_class.signature: BigDecimal calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_method.body: public BigDecimal calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout) {
          // rather simple...
          long days = checkin.until(checkout, DAYS);
  
          BigDecimal rate = null;
  
          switch (roomEquipment) {
              case BUDGET:
                  rate = BigDecimal.valueOf(60L);
                  break;
              case STANDARD:
                  rate = BigDecimal.valueOf(92L);
                  break;
              case SUPERIOR:
                  rate = BigDecimal.valueOf(210L);
                  break;
              default:
                  throw new IllegalArgumentException("Unknown equipment " + roomEquipment);
          }
  
          return rate.multiply(BigDecimal.valueOf(days));
      }
focal_method.class_method_signature: ReservationCostCalculator.calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_method.full_signature: public BigDecimal calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_method.identifier: calculateRateFor
focal_method.invocations: until valueOf valueOf valueOf multiply valueOf
focal_method.modifiers: public
focal_method.parameters: (RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)
focal_method.return: BigDecimal
focal_method.signature: BigDecimal calculateRateFor(RoomEquipment roomEquipment, LocalDate checkin, LocalDate checkout)