Package com.opengamma.master.exchange

Examples of com.opengamma.master.exchange.ExchangeDocument


  //-------------------------------------------------------------------------
  public void test_getExchange_UniqueId_noOverride_found() throws Exception {
    ExchangeMaster mock = mock(ExchangeMaster.class);
   
    ExchangeDocument doc = new ExchangeDocument(example());
    when(mock.get(UID)).thenReturn(doc);
    MasterExchangeSource test = new MasterExchangeSource(mock);
    Exchange testResult = test.get(UID);
    verify(mock, times(1)).get(UID);
   
View Full Code Here


  }

  public void test_getExchange_UniqueId_found() throws Exception {
    ExchangeMaster mock = mock(ExchangeMaster.class);
   
    ExchangeDocument doc = new ExchangeDocument(example());
    when(mock.get(OID, VC)).thenReturn(doc);
    MasterExchangeSource test = new MasterExchangeSource(mock, VC);
    Exchange testResult = test.get(UID);
    verify(mock, times(1)).get(OID, VC);
   
View Full Code Here

  //-------------------------------------------------------------------------
  public void test_getExchange_ObjectId_found() throws Exception {
    ExchangeMaster mock = mock(ExchangeMaster.class);
   
    ExchangeDocument doc = new ExchangeDocument(example());
    when(mock.get(OID, VC)).thenReturn(doc);
    MasterExchangeSource test = new MasterExchangeSource(mock, VC);
    Exchange testResult = test.get(OID, VC);
    verify(mock, times(1)).get(OID, VC);
   
View Full Code Here

    request.setPagingRequest(PagingRequest.ONE);
    request.setPagingRequest(PagingRequest.ONE);
    request.setVersionCorrection(VC);
   
    ExchangeSearchResult result = new ExchangeSearchResult();
    result.getDocuments().add(new ExchangeDocument(example()));
   
    when(mock.search(request)).thenReturn(result);
    MasterExchangeSource test = new MasterExchangeSource(mock, VC);
    Exchange testResult = test.getSingle(ID);
    verify(mock, times(1)).search(request);
View Full Code Here

    ExchangeSearchRequest request = new ExchangeSearchRequest(BUNDLE);
    request.setPagingRequest(PagingRequest.ONE);
    request.setVersionCorrection(VC);
   
    ExchangeSearchResult result = new ExchangeSearchResult();
    result.getDocuments().add(new ExchangeDocument(example()));
   
    when(mock.search(request)).thenReturn(result);
    MasterExchangeSource test = new MasterExchangeSource(mock, VC);
    Exchange testResult = test.getSingle(BUNDLE);
    verify(mock, times(1)).search(request);
View Full Code Here

TOP

Related Classes of com.opengamma.master.exchange.ExchangeDocument

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.