Exemple #1
0
  @Test
  public void testValidNullInstallmentsOfPayment() {

    try {
      payment = new Payment(service, 1, 1, null);
      assertEquals(new Integer(1), payment.getInstallments());
    } catch (PaymentException e) {
      fail("Should not throw this exception: " + e.getMessage());
    }
  }
Exemple #2
0
  /** Tests for payment service */
  @Test
  public void testValidServicePayment() {

    try {
      payment = new Payment(service, 1, 1, 1);
      assertEquals(service, payment.getService());
    } catch (PaymentException e) {
      fail("Should not throw this exception: " + e.getMessage());
    }
  }
Exemple #3
0
  @Test
  public void testDescriptionOfServicePayment() {

    try {
      PaymentDescription description = new PaymentDescription(1, 1);
      payment = new Payment(service, 1, 1, 1);
      assertEquals(description.getPaymentType(), payment.getDescription().getPaymentType());
      assertEquals(description.getPaymentForm(), payment.getDescription().getPaymentForm());
    } catch (PaymentException e) {
      fail("Should not throw this exception: " + e.getMessage());
    }
  }