Package com.opengamma.financial.analytics.fudgemsg

Source Code of com.opengamma.financial.analytics.fudgemsg.YieldCurveBundleBuilderTest

/**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.fudgemsg;

import static org.testng.AssertJUnit.assertEquals;

import org.testng.annotations.Test;

import com.opengamma.analytics.financial.interestrate.YieldCurveBundle;
import com.opengamma.analytics.financial.model.interestrate.curve.DiscountCurve;
import com.opengamma.analytics.math.curve.ConstantDoublesCurve;
import com.opengamma.util.test.TestGroup;

/**
* Test for {@code YieldCurveBundleBuilder}
*/
@Test(groups = TestGroup.UNIT)
public class YieldCurveBundleBuilderTest extends AnalyticsTestBase {

  @Test
  public void test() {
    final DiscountCurve curve = new DiscountCurve("name1", ConstantDoublesCurve.from(1.234));
    final YieldCurveBundle bundle = new YieldCurveBundle();
    bundle.setCurve("name2", curve);
    final YieldCurveBundle bundle2 = cycleObject(YieldCurveBundle.class, bundle);
    assertEquals(bundle, bundle2);
  }
}
TOP

Related Classes of com.opengamma.financial.analytics.fudgemsg.YieldCurveBundleBuilderTest

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.