Searched refs:expectThrows (Results 1 – 4 of 4) sorted by relevance
14 import static org.testng.Assert.expectThrows;78 expectThrows(Throwable.class, nonThrowingRunnable()); in expectThrowsRequiresAnExceptionToBeThrown()84 expectThrows(Throwable.class, nonThrowingRunnable()); in expectThrowsIncludesAnInformativeDefaultMessage()96 Throwable throwable = expectThrows(Throwable.class, throwingRunnable(npe)); in expectThrowsReturnsTheSameObjectThrown()105 expectThrows(IOException.class, throwingRunnable(npe)); in expectThrowsDetectsTypeMismatchesViaExplicitTypeHint()113 expectThrows(IOException.class, throwingRunnable(npe)); in expectThrowsWrapsAndPropagatesUnexpectedExceptions()127 expectThrows(IOException.class, throwingRunnable(npe)); in expectThrowsSuppliesACoherentErrorMessageUponTypeMismatch()
131 expectThrows(empty); in testRetainAll_emptyPreviouslyNonEmptyUnsupported()162 expectThrows(disjoint); in testRetainAll_disjointPreviouslyNonEmptyUnsupported()192 expectThrows(nonEmptyProperSubset); in testRetainAll_subsetUnsupported()222 expectThrows(partialOverlap); in testRetainAll_partialOverlapUnsupported()325 private void expectThrows(Target target) { in expectThrows() method in CollectionRetainAllTester
966 expectThrows(throwableClass, runnable); in assertThrows()981 …public static <T extends Throwable> T expectThrows(Class<T> throwableClass, ThrowingRunnable runna… in expectThrows() method in Assert
38 New: GITHUB-717: Add assertThrows and expectThrows (Ryan Schmitt)