Package com.opengamma.master.holiday

Examples of com.opengamma.master.holiday.HolidaySearchResult


  //-------------------------------------------------------------------------
  @Test
  public void test_searchHolidays_documents() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getPaging().getFirstItemOneBased());
    assertEquals(Integer.MAX_VALUE, test.getPaging().getPagingSize());
    assertEquals(_totalHolidays, test.getPaging().getTotalItems());
   
    assertEquals(_totalHolidays, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
    assert202(test.getDocuments().get(2));
  }
View Full Code Here


  //-------------------------------------------------------------------------
  @Test
  public void test_search_pageOne() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setPagingRequest(PagingRequest.ofPage(1, 2));
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getPaging().getFirstItemOneBased());
    assertEquals(2, test.getPaging().getPagingSize());
    assertEquals(_totalHolidays, test.getPaging().getTotalItems());
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
  }
View Full Code Here

  @Test
  public void test_search_pageTwo() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setPagingRequest(PagingRequest.ofPage(2, 2));
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(3, test.getPaging().getFirstItemOneBased());
    assertEquals(2, test.getPaging().getPagingSize());
    assertEquals(_totalHolidays, test.getPaging().getTotalItems());
   
    assertEquals(1, test.getDocuments().size());
    assert202(test.getDocuments().get(0));
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_name_noMatch() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setName("FooBar");
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  @Test
  public void test_search_name() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setName("TestHoliday102");
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
View Full Code Here

  @Test
  public void test_search_name_case() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setName("TESTHoliday102");
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
View Full Code Here

  @Test
  public void test_search_name_wildcard() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setName("TestHoliday1*");
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
  }
View Full Code Here

  @Test
  public void test_search_name_wildcardCase() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setName("TESTHoliday1*");
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_type() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setType(HolidayType.CURRENCY);
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(3, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert102(test.getDocuments().get(1));
    assert202(test.getDocuments().get(2));
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_providerNoMatch() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setProviderId(ExternalId.of("A", "B"));
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

TOP

Related Classes of com.opengamma.master.holiday.HolidaySearchResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.