Package com.opengamma.integration.tool.portfolio.xml

Examples of com.opengamma.integration.tool.portfolio.xml.SchemaVersion


  /**
   * Creates an instance.
   */
  public PortfolioConversionV1_0() {
    super(new SchemaVersion("1.0"), PortfolioDocumentV1_0.class, new PortfolioDocumentConverterV1_0(), new IdRefResolverFactoryV1_0());
  }
View Full Code Here


  }

  @Test
  public void testNoSchemaFoundInEmptyDirectory() throws IOException {
    FilesystemPortfolioSchemaLocator locator = new FilesystemPortfolioSchemaLocator(createEmptySchemaLocation());
    assertNull(locator.lookupSchema(new SchemaVersion("1.0")));
  }
View Full Code Here

  @Test
  public void testMatchingSchemaFoundInDirectory() throws IOException {
    FilesystemPortfolioSchemaLocator locator = new FilesystemPortfolioSchemaLocator(
        createSchemaLocationWithVersions("1.0", "1.1", "2.0"));
    assertNotNull(locator.lookupSchema(new SchemaVersion("1.0")));
    assertNotNull(locator.lookupSchema(new SchemaVersion("1.1")));
    assertNotNull(locator.lookupSchema(new SchemaVersion("2.0")));
  }
View Full Code Here

  @Test
  public void testNoSchemaFoundInDirectory() throws IOException {
    FilesystemPortfolioSchemaLocator locator = new FilesystemPortfolioSchemaLocator(
        createSchemaLocationWithVersions("1.0", "1.1", "2.0"));
    assertNull(locator.lookupSchema(new SchemaVersion("1.2")));
    assertNull(locator.lookupSchema(new SchemaVersion("2.1")));
    assertNull(locator.lookupSchema(new SchemaVersion("3.0")));
  }
View Full Code Here

@Test(groups = TestGroup.UNIT)
public class SchemaVersionTest {

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullVersionIsNotAllowed() {
    new SchemaVersion(null);
  }
View Full Code Here

    new SchemaVersion(null);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNonNumericVersionIsNotAllowed() {
    new SchemaVersion("1.a");
  }
View Full Code Here

    new SchemaVersion("1.a");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testTrailingNonNumericIsNotAllowed() {
    new SchemaVersion("1.4a");
  }
View Full Code Here

    new SchemaVersion("1.4a");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testLeadingNonNumericIsNotAllowed() {
    new SchemaVersion("a1.4");
  }
View Full Code Here

    new SchemaVersion("a1.4");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testMajorVersionOnlyIsNotAllowed() {
    new SchemaVersion("1.");
  }
View Full Code Here

    new SchemaVersion("1.");
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testMinorVersionOnlyIsNotAllowed() {
    new SchemaVersion(".1");
  }
View Full Code Here

TOP

Related Classes of com.opengamma.integration.tool.portfolio.xml.SchemaVersion

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.