Package com.opengamma.master.exchange

Examples of com.opengamma.master.exchange.ManageableExchange


  }

  @Test(expectedExceptions = DataNotFoundException.class)
  public void test_replaceVersion_notFound() {
    UniqueId uniqueId = UniqueId.of("DbExg", "0", "0");
    ManageableExchange exchange = new ManageableExchange(BUNDLE, "Test", REGION, null);
    exchange.setUniqueId(uniqueId);
    ExchangeDocument doc = new ExchangeDocument(exchange);
    _exgMaster.replaceVersion(doc);
  }
View Full Code Here


  }

  //-------------------------------------------------------------------------
  @Test
  public void testGetExchange() {
    final ManageableExchange target = new ManageableExchange(ExternalIdBundle.of("A", "B"), "Test", ExternalIdBundle.EMPTY, ZoneId.of("Europe/London"));
    final ExchangeDocument result = new ExchangeDocument(target);
    when(_underlying.get(OID, VersionCorrection.LATEST)).thenReturn(result);
   
    Response test = _resource.get(null, null);
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
View Full Code Here

    assertSame(result, test.getEntity());
  }

  @Test
  public void testUpdateExchange() {
    final ManageableExchange target = new ManageableExchange(ExternalIdBundle.of("A", "B"), "Test", ExternalIdBundle.EMPTY, ZoneId.of("Europe/London"));
    final ExchangeDocument request = new ExchangeDocument(target);
    request.setUniqueId(OID.atLatestVersion());
   
    final ExchangeDocument result = new ExchangeDocument(target);
    result.setUniqueId(OID.atVersion("1"));
View Full Code Here

  }

  //-------------------------------------------------------------------------
  @Test
  public void testAddExchange() {
    final ManageableExchange target = new ManageableExchange(ExternalIdBundle.of("A", "B"), "Test", ExternalIdBundle.EMPTY, ZoneId.of("Europe/London"));
    final ExchangeDocument request = new ExchangeDocument(target);
   
    final ExchangeDocument result = new ExchangeDocument(target);
    result.setUniqueId(UID);
    when(_underlying.add(same(request))).thenReturn(result);
View Full Code Here

  private ExchangeDocument addedDoc;

  @BeforeMethod
  public void setUp() {
    master = new InMemoryExchangeMaster();
    ManageableExchange inputExchange = new ManageableExchange(BUNDLE_FULL, NAME, GB, ZoneId.of("Europe/London"));
    ExchangeDocument inputDoc = new ExchangeDocument(inputExchange);
    addedDoc = master.add(inputDoc);
  }
View Full Code Here

    assertEquals(example(), testResult);
  }

  //-------------------------------------------------------------------------
  protected ManageableExchange example() {
    ManageableExchange exchange = new ManageableExchange();
    exchange.setUniqueId(UID);
    exchange.setName("NYSE");
    exchange.setRegionIdBundle(ExternalIdBundle.of(ExternalSchemes.countryRegionId(Country.US)));
    return exchange;
  }
View Full Code Here

TOP

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

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.