Ejemplo n.º 1
0
  @Test
  public void fromXmlWithInvalidElementIgnoredInProductionBuild() throws IOException {
    assumeTrue(XmlOutput.isProductionBuild());

    final String xmlResponse =
        "<Object Name=\"file1\" InCache=\"false\" Length=\"256\" Offset=\"0\" TheAnswerToEverything=\"42\" />";
    XmlOutput.fromXml(xmlResponse, BulkObject.class);
  }
Ejemplo n.º 2
0
  @Test(expected = java.io.IOException.class)
  public void fromXmlWithInvalidElementThrowsExceptionInDevBuild() throws IOException {
    assumeFalse(XmlOutput.isProductionBuild());

    final String xmlResponse =
        "<Object Name=\"file1\" InCache=\"false\" Length=\"256\" Offset=\"0\" TheAnswerToEverything=\"42\" />";
    XmlOutput.fromXml(xmlResponse, BulkObject.class);
  }