コード例 #1
0
ファイル: PaymentTest.java プロジェクト: italopaiva/SiMCTA
  @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());
    }
  }
コード例 #2
0
ファイル: PaymentTest.java プロジェクト: italopaiva/SiMCTA
  /** 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());
    }
  }
コード例 #3
0
ファイル: PaymentTest.java プロジェクト: italopaiva/SiMCTA
  @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());
    }
  }