Package buri.ddmsence.ddms.format

Examples of buri.ddmsence.ddms.format.Extent


    assertEquals("Test", array.get(0).getAsString());
    assertEquals("Dog", array.get(1).getAsString());
   
    // AbstractBaseComponent
    List<Extent> components = new ArrayList<Extent>();
    components.add(new Extent("qualifier", "value"));
    array = Util.getJSONArray(components);
    assertEquals(1, array.size());
   
    // Unknown
    try {
View Full Code Here


    assertEquals("name: 2.0\n", rights.buildHTMLTextOutput(OutputFormat.TEXT, "name", otherList));
  }

  @Test
  public void testOutputJSONPrettyPrint() throws InvalidDDMSException {
    Extent extent = new Extent("a", "z");
    PropertyReader.setProperty("output.json.prettyPrint", "false");
    assertEquals("{\"qualifier\":\"a\",\"value\":\"z\"}", extent.toJSON());
    PropertyReader.setProperty("output.json.prettyPrint", "true");
    assertEquals("{\n  \"qualifier\": \"a\",\n  \"value\": \"z\"\n}", extent.toJSON());
  }
View Full Code Here

      }

      // Invalid object in component list
      try {
        List<IDDMSComponent> components = new ArrayList<IDDMSComponent>(TEST_NO_OPTIONAL_COMPONENTS);
        components.add(new Extent(null, null));
        new Resource(components, null);
      }
      catch (InvalidDDMSException e) {
        expectMessage(e, "extent is not a valid");
      }
View Full Code Here

TOP

Related Classes of buri.ddmsence.ddms.format.Extent

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.