Package com.opengamma.master.holiday

Examples of com.opengamma.master.holiday.HolidaySearchResult


  @Test
  public void test_search_providerFound() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setProviderId(ExternalId.of("COPP_CLARK", "2"));
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
View Full Code Here


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

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

  @Test
  public void test_search_exchange_empty() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setExchangeExternalIdSearch(new ExternalIdSearch());
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

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

  @Test
  public void test_search_currency_noMatch() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setCurrency(Currency.USD);
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  @Test
  public void test_search_currency_oneMatch() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setCurrency(Currency.EUR);
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(1, test.getDocuments().size());
    assert102(test.getDocuments().get(0));
  }
View Full Code Here

  @Test
  public void test_search_currency_twoMatches() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setCurrency(Currency.GBP);
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert202(test.getDocuments().get(1));
  }
View Full Code Here

  //-------------------------------------------------------------------------
  @Test
  public void test_search_holidayIds_none() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.setHolidayObjectIds(new ArrayList<ObjectId>());
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(0, test.getDocuments().size());
  }
View Full Code Here

  public void test_search_holidayIds() {
    HolidaySearchRequest request = new HolidaySearchRequest();
    request.addHolidayObjectId(ObjectId.of("DbHol", "101"));
    request.addHolidayObjectId(ObjectId.of("DbHol", "201"));
    request.addHolidayObjectId(ObjectId.of("DbHol", "9999"));
    HolidaySearchResult test = _holMaster.search(request);
   
    assertEquals(2, test.getDocuments().size());
    assert101(test.getDocuments().get(0));
    assert202(test.getDocuments().get(1));
  }
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.