Пример #1
0
  /**
   * Test typical Acrobat CS3 metadata
   *
   * @throws Exception Forwards exceptions to JUnit
   */
  public void testAcrobatS3() throws Exception {
    XMPMeta xmp = XMPMetaFactory.parse(getTestFilestream("XMPApplicationDataTest_AcrobatCS3.xmp"));
    assertNotNull(xmp);

    log(xmp.dumpObject());

    compareReferenceAndResult("XMPApplicationDataTest_AcrobatCS3.txt", xmp.dumpObject());
  }
Пример #2
0
  /**
   * Test typical Indesign CS3 metadata
   *
   * @throws Exception Forwards exceptions to JUnit
   */
  @Ignore("todo: Import the latest changes to enable the below test case.")
  public void itestIndesignCS3() throws Exception {
    XMPMeta xmp = XMPMetaFactory.parse(getTestFilestream("XMPApplicationDataTest_IndesignCS3.xmp"));
    assertNotNull(xmp);

    log(xmp.dumpObject());

    compareReferenceAndResult("XMPApplicationDataTest_IndesignCS3.txt", xmp.dumpObject());
  }
Пример #3
0
 public void testBadInputGetArrayItem3() throws Exception {
   InputStream is = inputFileAsInputStream("ArraySamplesSmall.xml");
   XMPMeta meta = XMPMetaFactory.parse(is, new ParseOptions());
   // This should fail because of unreg. namespace for namespace
   expectException(
       meta,
       "getArrayItem",
       new Class[] {String.class, String.class, Integer.TYPE},
       new Object[] {"ns:bogus/", "arrayPropSmall", new Integer(1)},
       XMPError.BADSCHEMA,
       "Unregistered schema namespace URI");
 }
Пример #4
0
 public void testBadInputGetArrayItem2() throws Exception {
   InputStream is = inputFileAsInputStream("ArraySamplesSmall.xml");
   XMPMeta meta = XMPMetaFactory.parse(is, new ParseOptions());
   // This should fail because of "" for namespace
   expectException(
       meta,
       "getArrayItem",
       new Class[] {String.class, String.class, Integer.TYPE},
       new Object[] {TEST_NS1, "", new Integer(1)},
       XMPError.BADPARAM,
       "Empty array name");
 }
Пример #5
0
 /** @see XMPTestCase#setUp() */
 public void setUp() throws Exception {
   super.setUp();
   InputStream is = inputFileAsInputStream("ArraySamplesSmall.xml");
   meta = XMPMetaFactory.parse(is, new ParseOptions());
 }