org.gradle.testkit.runner

## Class UnexpectedBuildFailure

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.gradle.testkit.runner.UnexpectedBuildResultException
        - - org.gradle.testkit.runner.UnexpectedBuildFailure

- All Implemented Interfaces:
    Serializable

      @Incubating
      public class UnexpectedBuildFailure
      extends UnexpectedBuildResultException

  Thrown when executing a build that was expected to succeed, but failed.
  Since:
    2.6
  See Also:
    `GradleRunner.build()`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnexpectedBuildFailure(String message, BuildResult buildResult)`

  - ### Method Summary

    - ### Methods inherited from class org.gradle.testkit.runner.UnexpectedBuildResultException

      `getBuildResult`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### UnexpectedBuildFailure

          public UnexpectedBuildFailure(String message,
                                BuildResult buildResult)