Package com.opengamma.core.security.impl

Examples of com.opengamma.core.security.impl.SimpleSecurityLink


    SimpleSecurityLink test = new SimpleSecurityLink();
    assertEquals(ExternalIdBundle.EMPTY, LinkUtils.best(test));
  }

  public void test_best_objectId() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals(OBJECT_ID, LinkUtils.best(test));
  }
View Full Code Here


    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals(OBJECT_ID, LinkUtils.best(test));
  }

  public void test_best_externalId() {
    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals(EXTERNAL_ID_BUNDLE, LinkUtils.best(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals(EXTERNAL_ID_BUNDLE, LinkUtils.best(test));
  }

  public void test_best_bothIds() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    test.setExternalId(EXTERNAL_ID_BUNDLE);
    assertEquals(OBJECT_ID, LinkUtils.best(test));
  }
View Full Code Here

    assertEquals(null, LinkUtils.best(null));
  }

  //-------------------------------------------------------------------------
  public void test_bestName_empty() {
    SimpleSecurityLink test = new SimpleSecurityLink();
    assertEquals("", LinkUtils.bestName(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink();
    assertEquals("", LinkUtils.bestName(test));
  }

  public void test_bestName_objectId() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals("A~B", LinkUtils.bestName(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals("A~B", LinkUtils.bestName(test));
  }

  public void test_bestName_externalId() {
    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals("D", LinkUtils.bestName(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals("D", LinkUtils.bestName(test));
  }

  public void test_bestName_bothIds() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    test.setExternalId(EXTERNAL_ID_BUNDLE);
    assertEquals("D", LinkUtils.bestName(test));
  }
View Full Code Here

    assertEquals(null, LinkUtils.bestName(null));
  }

  //-------------------------------------------------------------------------
  public void test_isValid_empty() {
    SimpleSecurityLink test = new SimpleSecurityLink();
    assertEquals(false, LinkUtils.isValid(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink();
    assertEquals(false, LinkUtils.isValid(test));
  }

  public void test_isValid_objectId() {
    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals(true, LinkUtils.isValid(test));
  }
View Full Code Here

    SimpleSecurityLink test = new SimpleSecurityLink(OBJECT_ID);
    assertEquals(true, LinkUtils.isValid(test));
  }

  public void test_isValid_externalId() {
    SimpleSecurityLink test = new SimpleSecurityLink(EXTERNAL_ID_BUNDLE);
    assertEquals(true, LinkUtils.isValid(test));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.core.security.impl.SimpleSecurityLink

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.