예제 #1
0
  private void WebServiceBuildsCriteriaWithPolicyNumber(ClaimSearch cs) {
    queryParams.with(ClaimsWebService.POLICY_ID, "12345");
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();

    cs.findClaims(GROUPS, emptyClaims(), captured);
    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getPolicyId(), is(12345L));
  }
예제 #2
0
  private void WebServiceBuildsCriteriaWithClaimantName(ClaimSearch cs) {
    queryParams.with("claimantName", "Name");
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();

    cs.findClaims(GROUPS, emptyClaims(), captured);
    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getClaimantName(), is(equalTo("Name")));
  }
예제 #3
0
  // --------------------------------
  // Criteria Construction Tests
  // --------------------------------
  private void WebServiceBuildsCriteriaWithClaimNumber(ClaimSearch cs) {
    String claimNumber = "claimnumber";

    queryParams.with("number", claimNumber);
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();

    cs.findClaims(GROUPS, emptyClaims(), captured);
    assertThat(captured.getValue().getNumber(), is(equalTo(claimNumber)));
  }
예제 #4
0
  @Test
  public void WebServiceBuildsCriteriaWithPolicyBeginDateRange() {
    Capture<ClaimSearchCriteria> captured = new Capture<ClaimSearchCriteria>();
    queryParams.with("policyDateStart", "01012004").with("policyDateEnd", "01012006");

    new SlClaimSearch().findClaims(GROUPS, emptyClaims(), captured);

    ClaimSearchCriteria criteria = captured.getValue();
    assertThat(criteria.getPolicyBeginDate(), is(createDate("2004/01/01")));
    assertThat(criteria.getPolicyEndDate(), is(createDate("2006/01/01")));
  }
예제 #5
0
  @Test(expected = WebApplicationException.class)
  public void ToIncurredDateWithNoFromDateFails() {
    queryParams.with(ClaimsWebService.INCURRED_DATE_TO, "01012004");

    new WcClaimSearch().findClaims(GROUPS, emptyClaims(), new Capture<ClaimSearchCriteria>());
  }
예제 #6
0
  @Test(expected = WebApplicationException.class)
  public void PolicyDateEndWithNoStartFails() {
    queryParams.with(ClaimsWebService.POLICY_DATE_END, "01012004");

    new SlClaimSearch().findClaims(GROUPS, emptyClaims(), null);
  }