Package org.gradle.testkit.runner

## Class UnexpectedBuildSuccess

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

- All Implemented Interfaces:
    `Serializable`

      public class UnexpectedBuildSuccess
      extends UnexpectedBuildResultException

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

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `UnexpectedBuildSuccess​(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

    - #### UnexpectedBuildSuccess

          public UnexpectedBuildSuccess​(String message,
                                        BuildResult buildResult)