HomeSort by relevance Sort by last modified time
    Searched refs:expectedException (Results 1 - 25 of 30) sorted by null

1 2

  /external/mockito/src/test/java/org/mockito/verification/
NegativeDurationTest.java 9 import org.junit.rules.ExpectedException;
15 public ExpectedException expectedException = ExpectedException.none();
19 expectedException.expect(FriendlyReminderException.class);
20 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!");
26 expectedException.expect(FriendlyReminderException.class);
27 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!");
  /external/mockito/src/test/java/org/mockito/internal/util/
ChecksTest.java 12 import org.junit.rules.ExpectedException;
16 public ExpectedException expectedException = ExpectedException.none();
30 expectedException.expect(IllegalArgumentException.class);
31 expectedException.expectMessage("someValue should not be null");
37 expectedException.expect(IllegalArgumentException.class);
38 expectedException.expectMessage("someValue should not be null. Oh no!");
TimerTest.java 10 import org.junit.rules.ExpectedException;
16 public ExpectedException expectedException = ExpectedException.none();
46 expectedException.expect(FriendlyReminderException.class);
47 expectedException.expectMessage("Don't panic! I'm just a friendly reminder!");
  /external/mockito/src/test/java/org/mockitoutil/
JUnitResultAssert.java 36 * @param expectedException - the exception of each failure
38 public JUnitResultAssert fails(int expectedFailureCount, Class expectedException) {
41 if (!expectedException.isInstance(f.getException())) {
42 throw new AssertionError("Incorrect failure type, expected: " + expectedException + ", actual: " + f.getException().getClass().getSimpleName() + "\n" +
83 public JUnitResultAssert fails(Class expectedException, String exceptionMessage) {
84 fails(1, expectedException);
93 public JUnitResultAssert fails(String methodName, Class expectedException) {
95 if (methodName.equals(f.getDescription().getMethodName()) && expectedException.isInstance(f.getException())) {
99 throw new AssertionError("Method '" + methodName + "' did not fail with: " + expectedException.getSimpleName()
106 public JUnitResultAssert fails(int expectedFailureCount, String methodName, Class expectedException) {
    [all...]
  /external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/propagation/
BinaryFormatImplTest.java 30 import org.junit.rules.ExpectedException;
51 @Rule public ExpectedException expectedException = ExpectedException.none();
100 expectedException.expect(SpanContextParseException.class);
101 expectedException.expectMessage("Unsupported version.");
107 expectedException.expect(SpanContextParseException.class);
108 expectedException.expectMessage("Unsupported version.");
118 expectedException.expect(SpanContextParseException.class);
119 expectedException.expectMessage
    [all...]
  /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/junit/rules/
ExpectedLogMessagesRuleTest.java 7 import org.junit.rules.ExpectedException;
16 private ExpectedException expectedException = ExpectedException.none();
18 @Rule public RuleChain chain = RuleChain.outerRule(expectedException).around(rule);
22 expectedException.expect(AssertionError.class);
34 expectedException.expect(AssertionError.class);
40 expectedException.expect(AssertionError.class);
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/
TestIDNARef.java 111 private void doTestToUnicode(String src, String expected, int options, Object expectedException)
128 if(expectedException!=null && !unassignedException.equals(expectedException)){
132 if(expectedException == null || !ex.equals(expectedException)){
143 if(expectedException!=null && !unassignedException.equals(expectedException)){
147 if(expectedException == null || !ex.equals(expectedException)){
158 if(expectedException!=null && !unassignedException.equals(expectedException))
    [all...]
TestIDNA.java 88 private void doTestToUnicode(String src, String expected, int options, Object expectedException)
99 if(expectedException!=null && !unassignedException.equals(expectedException)){
103 if(expectedException == null || !ex.equals(expectedException)){
114 if(expectedException!=null && !unassignedException.equals(expectedException)){
118 if(expectedException == null || !ex.equals(expectedException)){
129 if(expectedException!=null && !unassignedException.equals(expectedException))
    [all...]
  /external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/stringprep/
TestIDNARef.java 108 private void doTestToUnicode(String src, String expected, int options, Object expectedException)
125 if(expectedException!=null && !unassignedException.equals(expectedException)){
129 if(expectedException == null || !ex.equals(expectedException)){
140 if(expectedException!=null && !unassignedException.equals(expectedException)){
144 if(expectedException == null || !ex.equals(expectedException)){
155 if(expectedException!=null && !unassignedException.equals(expectedException))
    [all...]
TestIDNA.java 85 private void doTestToUnicode(String src, String expected, int options, Object expectedException)
96 if(expectedException!=null && !unassignedException.equals(expectedException)){
100 if(expectedException == null || !ex.equals(expectedException)){
111 if(expectedException!=null && !unassignedException.equals(expectedException)){
115 if(expectedException == null || !ex.equals(expectedException)){
126 if(expectedException!=null && !unassignedException.equals(expectedException))
    [all...]
  /cts/tests/tests/accounts/src/android/accounts/cts/
AccountTest.java 21 } catch (IllegalArgumentException expectedException) {
29 } catch (IllegalArgumentException expectedException) {
AuthenticatorDescriptionTest.java 22 } catch (IllegalArgumentException expectedException) {
30 } catch (IllegalArgumentException expectedException) {
  /external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
ShadowAssetManagerTest.java 24 import org.junit.rules.ExpectedException;
36 public ExpectedException expectedException = ExpectedException.none();
50 expectedException.expect(FileNotFoundException.class);
51 expectedException.expectMessage("This file can not be opened as a file descriptor; it is probably compressed");
84 expectedException.expect(IOException.class);
85 expectedException.expectMessage(
95 expectedException.expect(Resources.NotFoundException.class);
96 expectedException.expectMessage("Resource ID #0xffffffff")
    [all...]
ShadowNfcAdapterTest.java 17 import org.junit.rules.ExpectedException;
24 @Rule public ExpectedException expectedException = ExpectedException.none();
61 expectedException.expect(NullPointerException.class);
62 expectedException.expectMessage("activity cannot be null");
74 expectedException.expect(NullPointerException.class);
75 expectedException.expectMessage("activities cannot contain null");
139 expectedException.expect(IllegalStateException.class);
  /external/objenesis/main/src/test/java/org/objenesis/
ObjenesisTest.java 20 import org.junit.rules.ExpectedException;
32 public ExpectedException expectedException = ExpectedException.none();
73 expectedException.expect(IllegalArgumentException.class);
  /art/test/064-field-access/src/
Main.java 65 * The "expectedException" must match the class of the exception thrown,
71 Class<?> expectedException) {
107 if (expectedException != null) {
110 "', was expecting " + expectedException);
114 if (expectedException == null) {
119 if (!expectedException.equals(ex.getClass())) {
121 + expectedException.getName() + ", got "
649 Class<?> expectedException) {
685 if (expectedException != null) {
688 "', was expecting " + expectedException);
    [all...]
  /art/test/800-smali/src/
Main.java 30 Throwable expectedException, Object expectedReturn,
36 this.expectedException = expectedException;
42 Throwable expectedException, Object expectedReturn) {
43 this(testName, testClass, testMethodName, values, expectedException,
51 Throwable expectedException;
240 if (tc.expectedException != null) {
260 if (tc.expectedException == null) {
263 exc.getCause().getClass().equals(tc.expectedException.getClass())) {
265 } else if (!tc.expectedException.getClass().equals(exc.getClass()))
    [all...]
  /cts/tests/tests/database/src/android/database/sqlite/cts/
SQLiteStatementTest.java 267 SQLiteDoneException expectedException = null;
271 expectedException = ex;
278 assertNotNull("Should have thrown SQLiteDoneException", expectedException);
288 SQLiteDoneException expectedException = null;
292 expectedException = ex;
299 assertNotNull("Should have thrown SQLiteDoneException", expectedException);
  /external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
GzipInflatingBufferTest.java 208 } catch (IllegalStateException expectedException) {
209 assertEquals("GzipInflatingBuffer is closed", expectedException.getMessage());
439 } catch (ZipException expectedException) {
440 assertEquals("Not in GZIP format", expectedException.getMessage());
452 } catch (ZipException expectedException) {
453 assertEquals("Unsupported compression method", expectedException.getMessage());
530 } catch (ZipException expectedException) {
531 assertEquals("Corrupt GZIP header", expectedException.getMessage());
586 } catch (DataFormatException expectedException) {
589 expectedException.getMessage().startsWith("Inflater data format exception:"))
    [all...]
  /cts/tests/tests/os/src/android/os/cts/
PowerManager_ThermalTest.java 96 } catch (IllegalArgumentException expectedException) {
114 } catch (IllegalArgumentException expectedException) {
  /external/grpc-grpc-java/protobuf/src/test/java/io/grpc/protobuf/
StatusProtoTest.java 81 } catch (IllegalArgumentException expectedException) {
82 assertEquals("invalid status code", expectedException.getMessage());
123 } catch (IllegalArgumentException expectedException) {
124 assertEquals("invalid status code", expectedException.getMessage());
  /external/objenesis/tck/src/test/java/org/objenesis/tck/
CandidateLoaderTest.java 103 catch(IOException expectedException) {
  /external/snakeyaml/src/test/java/org/yaml/snakeyaml/array/
PrimitiveArrayTest.java 78 private void tryInvalid(String t, Class<?> expectedException) {
82 fail("Expected " + expectedException.getCanonicalName() + " but loaded = \"" + loaded
85 assertEquals(expectedException, e.getCause().getClass());
  /external/hamcrest/hamcrest-library/src/test/java/org/hamcrest/xml/
HasXPathTest.java 112 } catch (IllegalArgumentException expectedException) {
  /external/guava/guava-tests/test/com/google/common/util/concurrent/
FuturesTest.java 531 RuntimeException expectedException = new RuntimeException();
532 runExpectedExceptionFallbackTest(expectedException, false);
536 Exception expectedException = new Exception() {};
537 runExpectedExceptionFallbackTest(expectedException, false);
558 RuntimeException expectedException = new RuntimeException();
559 runExpectedExceptionFallbackTest(expectedException, true);
563 Exception expectedException = new Exception() {};
564 runExpectedExceptionFallbackTest(expectedException, true);
569 Throwable expectedException, boolean wrapInFuture) throws Exception {
574 expect(fallback.create(raisedException)).andThrow(expectedException);
    [all...]

Completed in 1565 milliseconds

1 2