Examples of Failure


Examples of rocks.xmpp.extensions.compress.model.Failure

    @Test
    public void unmarshalFailureUnsupportedMethod() throws XMLStreamException, JAXBException {
        String xml = "<failure xmlns='http://jabber.org/protocol/compress'>\n" +
                "  <unsupported-method/>\n" +
                "</failure>\n";
        Failure failure = unmarshal(xml, Failure.class);

        Assert.assertNotNull(failure);
        Assert.assertTrue(failure.getCondition() instanceof Failure.UnsupportedMethod);
    }
View Full Code Here

Examples of ru.yandex.qatools.allure.model.Failure

     * Create failure from throwable using {@link #getMessage(Throwable)} and {@link #getStackTrace(Throwable)}
     *
     * @return created failure
     */
    private Failure getFailure() {
        return new Failure()
                .withMessage(getMessage(getThrowable()))
                .withStackTrace(getStackTrace(getThrowable()));
    }
View Full Code Here

Examples of scala.util.Failure

        public Try<Long> invert(String in) {
          try {
            return new Success(Long.valueOf(in));
          }
          catch(NumberFormatException nfe) {
            return new Failure(new InversionFailure(in, nfe));
          }
        }
      };
      assertEquals(Long.valueOf("123"), l2s.invert("123").get());
      assertEquals(true, l2s.invert("hello").isFailure());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.