Package com.opengamma.financial.analytics.ircurve.strips

Examples of com.opengamma.financial.analytics.ircurve.strips.ZeroCouponInflationNode.accept()


  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullZeroCouponInflationConvention() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.EIGHT_MONTHS, ZERO_COUPON_INFLATION_ID, FIXED_LEG_ID, InflationNodeType.INTERPOLATED, "TEST");
    node.accept(EMPTY_CONVENTIONS);
  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullPriceIndexConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
View Full Code Here


  public void testNullPriceIndexConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(ZERO_COUPON_INFLATION_ID, INFLATION_LEG);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.EIGHT_MONTHS, ZERO_COUPON_INFLATION_ID, FIXED_LEG_ID, InflationNodeType.MONTHLY, "TEST");
    node.accept(visitor);
  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testWrongTypeZeroCouponInflationConvention() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.EIGHT_MONTHS, SWAP_3M_IBOR_ID, FIXED_LEG_ID, InflationNodeType.INTERPOLATED, "TEST");
View Full Code Here

  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testWrongTypeZeroCouponInflationConvention() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.EIGHT_MONTHS, SWAP_3M_IBOR_ID, FIXED_LEG_ID, InflationNodeType.INTERPOLATED, "TEST");
    node.accept(VISITOR);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testUnhandledConvention() {
    final FXSpotConvention convention = new FXSpotConvention("Test", ExternalIdBundle.of(ExternalId.of("Test", "Test")), 0, US);
View Full Code Here

  }

  @Test
  public void testZeroCouponInflationNode() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.EIGHT_MONTHS, ZERO_COUPON_INFLATION_ID, FIXED_LEG_ID, InflationNodeType.INTERPOLATED, "TEST");
    final Set<Currency> currencies = node.accept(VISITOR);
    assertEquals(1, currencies.size());
    assertEquals(Currency.USD, currencies.iterator().next());
  }
}
View Full Code Here

  }

  @Test
  public void testZeroCouponInflation() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.TWO_MONTHS, ExternalId.of("Test", "Test"), ExternalId.of("Test", "Test"), InflationNodeType.MONTHLY, "Test");
    assertEquals(new CurveNodeWithIdentifier(node, ExternalId.of("Test", "ZCI"), "ZC Data", DataFieldType.OUTRIGHT), node.accept(BUILDER));
  }

  private static class TestCurveInstrumentProvider implements CurveInstrumentProvider {
    private final ExternalId _id;
    private final String _dataField;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.