Ejemplo n.º 1
0
  @Test
  public void childrenHaveHorribleCredit() throws Exception {
    // Build the request message
    Applicant applicant = new Applicant();
    applicant.setName("Peter Gibbons");
    applicant.setAge(8);

    // Invoke the service
    service.operation("process").sendInOut(applicant);

    // validate the results
    Assert.assertEquals(160, applicant.getCreditScore());
  }
Ejemplo n.º 2
0
  @Test
  public void goodCredit() throws Exception {

    // Build the request message
    Applicant applicant = new Applicant();
    applicant.setName("Bill Lumbergh");
    applicant.setCreditScore(700);

    // Invoke the service
    service.operation("process").sendInOut(applicant);

    // validate the results
    Assert.assertTrue(applicant.isApproved());
  }
Ejemplo n.º 3
0
  @Test
  public void lowCredit() throws Exception {

    // Build the request message
    Applicant applicant = new Applicant();
    applicant.setName("Peter Gibbons");
    applicant.setCreditScore(400);

    // Invoke the service
    Applicant reply = service.operation("process").sendInOut(applicant).getContent(Applicant.class);

    // validate the results
    Assert.assertTrue(!reply.isApproved());
  }
Ejemplo n.º 4
0
  @Test
  public void adultsAreResponsible() throws Exception {

    // Build the request message
    Applicant request = new Applicant();
    request.setName("Bill Lumbergh");
    request.setAge(39);

    // Invoke the service
    Applicant reply = service.operation("process").sendInOut(request).getContent(Applicant.class);

    // validate the results
    Assert.assertNotSame(780, reply.getCreditScore());
  }