Class TestResult


  • public class TestResult
    extends java.lang.Object
    A test result information.
    • Constructor Summary

      Constructors 
      Constructor Description
      TestResult​(int exitCode, java.util.List<Resource> resources, java.util.List<java.lang.Exception> exceptions, java.util.List<java.lang.String> errors, java.util.Map<java.lang.String,​Output<?>> outputs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> errors()  
      java.util.List<java.lang.Exception> exceptions()  
      int exitCode()  
      Output<java.lang.Object> output​(java.lang.String name)
      Gets an output associated with the given name.
      <T> Output<T> output​(java.lang.String name, java.lang.Class<T> type)
      Gets an output associated with the given name and casts the value to the given type.
      java.util.Map<java.lang.String,​Output<?>> outputs()  
      java.util.List<Resource> resources()  
      TestResult throwOnError()
      Throw RunException if we've encountered an exception or return TestResult otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestResult

        public TestResult​(int exitCode,
                          java.util.List<Resource> resources,
                          java.util.List<java.lang.Exception> exceptions,
                          java.util.List<java.lang.String> errors,
                          java.util.Map<java.lang.String,​Output<?>> outputs)
    • Method Detail

      • exitCode

        public int exitCode()
      • resources

        public java.util.List<Resource> resources()
      • exceptions

        public java.util.List<java.lang.Exception> exceptions()
      • errors

        public java.util.List<java.lang.String> errors()
      • outputs

        public java.util.Map<java.lang.String,​Output<?>> outputs()
      • output

        public Output<java.lang.Object> output​(java.lang.String name)
        Gets an output associated with the given name.
        Parameters:
        name - the stack output name
        Returns:
        an output associated with the given name
      • output

        public <T> Output<T> output​(java.lang.String name,
                                    java.lang.Class<T> type)
        Gets an output associated with the given name and casts the value to the given type.
        Type Parameters:
        T - the stack output type
        Parameters:
        name - the stack output name
        type - the stack output Class to use for casting
        Returns:
        an output associated with the given name