/external/mockito/src/test/java/org/mockitousage/verification/ |
D | DescriptiveMessagesWhenVerificationFailsTest.java | 47 assertThat(e).hasMessageContaining(expectedMessage); in should_print_method_name() 63 assertThat(e).hasMessageContaining("iMethods.threeArgumentMethod(12, foo, \"xx\")"); in should_print_method_name_and_arguments() 81 assertThat(e).hasMessageContaining(wanted); in should_print_actual_and_wanted_in_line() 89 assertThat(e).hasMessageContaining(actual); in should_print_actual_and_wanted_in_line() 115 assertThat(e).hasMessageContaining(wanted); in should_print_actual_and_wanted_in_multiple_lines() 129 assertThat(e).hasMessageContaining(actual); in should_print_actual_and_wanted_in_multiple_lines() 141 … assertThat(e).hasMessageContaining("simpleMethod(10)").hasMessageContaining("simpleMethod()"); in should_print_actual_and_wanted_when_actual_method_name_and_wanted_method_name_are_the_same() 155 assertThat(e).hasMessageContaining("(2, 1000)").hasMessageContaining("(2, 2)"); in should_print_actual_and_unverified_wanted_when_the_difference_is_about_arguments() 175 assertThat(e).hasMessageContaining(expectedMessage); in should_print_first_unexpected_invocation() 182 assertThat(e).hasMessageContaining(expectedCause); in should_print_first_unexpected_invocation() [all …]
|
D | DescriptiveMessagesOnVerificationInOrderErrorsTest.java | 62 assertThat(e).hasMessageContaining(expected); in shouldPrintVerificationInOrderErrorAndShowBothWantedAndPrevious() 72 assertThat(e).hasMessageContaining(expectedCause); in shouldPrintVerificationInOrderErrorAndShowBothWantedAndPrevious() 90 assertThat(e).hasMessageContaining(expected); in shouldPrintVerificationInOrderErrorAndShowWantedOnly() 100 assertThat(e).hasMessageContaining("has different arguments"); in shouldPrintVerificationInOrderErrorAndShowWantedAndActual() 112 assertThat(e).hasMessageContaining("Wanted but not invoked"); in shouldNotSayArgumentsAreDifferent() 133 assertThat(e).hasMessageContaining(expectedMessage); in shouldPrintMethodThatWasNotInvoked() 154 assertThat(e).hasMessageContaining(expectedMessage); in shouldPrintTooManyInvocations() 161 assertThat(e).hasMessageContaining(expectedCause); in shouldPrintTooManyInvocations() 186 assertThat(e).hasMessageContaining(expectedMessage); in shouldPrintTooLittleInvocations() 194 assertThat(e).hasMessageContaining(expectedCause); in shouldPrintTooLittleInvocations()
|
D | DescriptiveMessagesWhenTimesXVerificationFailsTest.java | 38 .hasMessageContaining("mock.clear();") in shouldVerifyActualNumberOfInvocationsSmallerThanWanted() 39 .hasMessageContaining("Wanted 100 times") in shouldVerifyActualNumberOfInvocationsSmallerThanWanted() 40 .hasMessageContaining("was 3"); in shouldVerifyActualNumberOfInvocationsSmallerThanWanted() 57 .hasMessageContaining("mock.clear();") in shouldVerifyActualNumberOfInvocationsLargerThanWanted() 58 .hasMessageContaining("Wanted 1 time") in shouldVerifyActualNumberOfInvocationsLargerThanWanted() 59 .hasMessageContaining("was 4"); in shouldVerifyActualNumberOfInvocationsLargerThanWanted()
|
D | PrintingVerboseTypesWithArgumentsTest.java | 44 .hasMessageContaining("withLong((Integer) 100);") in should_not_report_argument_types_when_to_string_is_the_same() 45 .hasMessageContaining("withLong((Long) 100L);"); in should_not_report_argument_types_when_to_string_is_the_same() 62 .hasMessageContaining("withLongAndInt((Integer) 100, 200)") in should_show_the_type_of_only_the_argument_that_doesnt_match() 63 .hasMessageContaining("withLongAndInt((Long) 100L, 200)"); in should_show_the_type_of_only_the_argument_that_doesnt_match() 104 .hasMessageContaining("withLongAndInt(100L, 200)") in should_not_show_types_when_argument_value_is_different() 105 .hasMessageContaining("withLongAndInt(100L, 230)"); in should_not_show_types_when_argument_value_is_different() 142 assertThat(e).hasMessageContaining("simpleMethod(foo)"); in should_not_show_types_when_types_are_the_same_even_if_to_string_gives_the_same_result()
|
D | OrdinaryVerificationPrintsAllInteractionsTest.java | 37 .hasMessageContaining("However, there were exactly 2 interactions with this mock") in shouldShowAllInteractionsOnMockWhenOrdinaryVerificationFail() 38 .hasMessageContaining("firstInteraction(") in shouldShowAllInteractionsOnMockWhenOrdinaryVerificationFail() 39 .hasMessageContaining("secondInteraction("); in shouldShowAllInteractionsOnMockWhenOrdinaryVerificationFail() 62 assertThat(e).hasMessageContaining("there were zero interactions with this mock."); in shouldNotShowAllInteractionsHeaderWhenNoOtherInteractions()
|
D | ExactNumberOfTimesVerificationTest.java | 41 .hasMessageContaining("Wanted 100 times") in shouldDetectTooLittleActualInvocations() 42 .hasMessageContaining("was 2"); in shouldDetectTooLittleActualInvocations() 57 .hasMessageContaining("Wanted 1 time") in shouldDetectTooManyActualInvocations() 58 .hasMessageContaining("was 2 times"); in shouldDetectTooManyActualInvocations() 79 assertThat(e).hasMessageContaining("Never wanted here"); in shouldDetectActuallyCalledOnce()
|
D | VerificationWithAfterTest.java | 124 …}).isInstanceOf(AssertionError.class).hasMessageContaining("Wanted *at least* 3 times"); //TODO sp… in should_verify_with_at_least_and_fail() 151 …}).isInstanceOf(AssertionError.class).hasMessageContaining("Wanted at most 1 time but was 2"); //T… in should_verify_with_at_most_and_fail() 174 …}).isInstanceOf(MoreThanAllowedActualInvocations.class).hasMessageContaining("Wanted at most 0 tim… in should_verify_with_never_and_fail() 199 …}).isInstanceOf(AssertionError.class).hasMessageContaining("No interactions wanted here"); //TODO … in should_verify_with_only_and_fail()
|
D | VerificationWithTimeoutTest.java | 72 }).isInstanceOf(AssertionError.class).hasMessageContaining("Wanted but not invoked"); in should_verify_with_timeout_and_fail() 91 }).isInstanceOf(AssertionError.class).hasMessageContaining("Wanted but not invoked"); in should_verify_with_timeout_and_fail_early() 197 …}).isInstanceOf(AssertionError.class).hasMessageContaining("Wanted but not invoked"); //TODO speci… in should_verify_with_only_and_fail_early()
|
/external/mockito/src/test/java/org/mockitousage/annotation/ |
D | SpyAnnotationTest.java | 194 assertThat(e).hasMessageContaining("@Spy annotation can only initialize inner classes"); in should_report_when_enclosing_instance_is_needed() 207 … assertThat(e).hasMessageContaining("Unable to initialize @Spy annotated field 'spy_field'") in should_report_private_inner_not_supported() 208 .hasMessageContaining(WithInnerPrivate.InnerPrivate.class.getSimpleName()); in should_report_private_inner_not_supported() 218 …assertThat(e).hasMessageContaining("@Spy annotation can't initialize private abstract inner classe… in should_report_private_abstract_inner_not_supported() 219 .hasMessageContaining(WithInnerPrivateAbstract.class.getSimpleName()) in should_report_private_abstract_inner_not_supported() 220 … .hasMessageContaining(WithInnerPrivateAbstract.InnerPrivateAbstract.class.getSimpleName()) in should_report_private_abstract_inner_not_supported() 221 .hasMessageContaining("You should augment the visibility of this inner class"); in should_report_private_abstract_inner_not_supported() 231 …assertThat(e).hasMessageContaining("@Spy annotation can't initialize private abstract inner classe… in should_report_private_static_abstract_inner_not_supported() 232 .hasMessageContaining(WithInnerPrivateStaticAbstract.class.getSimpleName()) in should_report_private_static_abstract_inner_not_supported() 233 ….hasMessageContaining(WithInnerPrivateStaticAbstract.InnerPrivateStaticAbstract.class.getSimpleNam… in should_report_private_static_abstract_inner_not_supported() [all …]
|
D | CaptorAnnotationUnhappyPathTest.java | 39 .hasMessageContaining("notACaptorField") in shouldFailIfCaptorHasWrongType() 40 .hasMessageContaining("wrong type"); in shouldFailIfCaptorHasWrongType()
|
/external/mockito/src/test/java/org/mockitousage/stacktrace/ |
D | ClickableStackTracesWhenFrameworkMisusedTest.java | 42 .hasMessageContaining("-> at ") in shouldPointOutMisplacedMatcher() 43 .hasMessageContaining("misplacedArgumentMatcherHere("); in shouldPointOutMisplacedMatcher() 61 .hasMessageContaining("-> at ") in shouldPointOutUnfinishedStubbing() 62 .hasMessageContaining("unfinishedStubbingHere("); in shouldPointOutUnfinishedStubbing() 73 assertThat(e).hasMessageContaining("unfinishedVerificationHere("); in shouldShowWhereIsUnfinishedVerification()
|
D | PointingStackTraceToActualInvocationInOrderTest.java | 62 assertThat(e).hasMessageContaining("fourth("); in shouldPointStackTraceToPreviousVerified() 74 assertThat(e).hasMessageContaining("third("); in shouldPointToThirdMethod() 87 assertThat(e).hasMessageContaining("second("); in shouldPointToSecondMethod() 97 assertThat(e).hasMessageContaining("first("); in shouldPointToFirstMethodBecauseOfTooManyActualInvocations() 109 assertThat(e).hasMessageContaining("second("); in shouldPointToSecondMethodBecauseOfTooManyActualInvocations() 123 assertThat(e).hasMessageContaining("fourth("); in shouldPointToFourthMethodBecauseOfTooLittleActualInvocations()
|
D | PointingStackTraceToActualInvocationChunkInOrderTest.java | 65 assertThat(e).hasMessageContaining("secondChunk("); in shouldPointStackTraceToPreviousInvocation() 77 assertThat(e).hasMessageContaining("thirdChunk("); in shouldPointToThirdInteractionBecauseAtLeastOnceUsed() 91 assertThat(e).hasMessageContaining("thirdChunk("); in shouldPointToThirdChunkWhenTooLittleActualInvocations() 103 assertThat(e).hasMessageContaining("fourthChunk("); in shouldPointToFourthChunkBecauseTooManyActualInvocations()
|
D | ClickableStackTracesTest.java | 38 … assertThat(e).hasMessageContaining("callMethodOnMock(").hasMessageContaining("verifyTheMock("); in shouldShowActualAndExpectedWhenArgumentsAreDifferent()
|
/external/mockito/src/test/java/org/mockitousage/stubbing/ |
D | StubbingUsingDoReturnTest.java | 82 assertThat(e).hasMessageContaining("Checked exception is invalid"); in should_detect_invalid_checked_exception() 93 .hasMessageContaining("void method") in should_scream_when_return_set_for_void() 94 .hasMessageContaining("cannot"); in should_scream_when_return_set_for_void() 104 assertThat(e).hasMessageContaining("Argument passed to when() is not a mock"); in should_scream_when_not_a_mock_passed() 114 assertThat(e).hasMessageContaining("Argument passed to when() is null"); in should_scream_when_null_passed() 210 assertThat(e).hasMessageContaining("Only void methods can doNothing()"); in should_not_allow_do_nothing_on_non_voids() 246 … assertThat(e).hasMessageContaining("String cannot be returned by booleanObjectReturningMethod()" + in should_detect_invalid_return_type() 258 assertThat(e).hasMessageContaining("null cannot be returned by intReturningMethod"); in should_detect_when_null_assigned_to_boolean()
|
D | SmartNullsStubbingTest.java | 41 assertThat(e).hasMessageContaining("unstubbedMethodInvokedHere("); in shouldSmartNPEPointToUnstubbedCall() 120 assertThat(e).hasMessageContaining("yes sir"); in shouldShowParameters() 134 assertThat(e).hasMessageContaining("Lorem Ipsum"); in shouldShowParametersWhenParamsAreHuge()
|
/external/mockito/src/test/java/org/mockitousage/misuse/ |
D | DetectingMisusedMatchersTest.java | 60 assertThat(e).hasMessageContaining("Misplaced or misused argument matcher"); in should_fail_fast_when_argument_matchers_are_abused() 79 … .hasMessageContaining("DetectingMisusedMatchersTest.misplaced_anyInt_argument_matcher") in should_report_argument_locations_when_argument_matchers_misused() 80 … .hasMessageContaining("DetectingMisusedMatchersTest.misplaced_anyObject_argument_matcher") in should_report_argument_locations_when_argument_matchers_misused() 81 … .hasMessageContaining("DetectingMisusedMatchersTest.misplaced_anyBoolean_argument_matcher"); in should_report_argument_locations_when_argument_matchers_misused()
|
/external/mockito/src/test/java/org/mockitousage/strictness/ |
D | StrictnessPerMockTest.java | 83 .hasMessageContaining("1. -> ") in unnecessary_stubbing() 87 .isNot(TestBase.hasMessageContaining("2. ->")); in unnecessary_stubbing() 107 .hasMessageContaining("But found this interaction on mock 'iMethods'") in verify_no_more_invocations() 110 .hasMessageContaining("Actually, above is the only interaction with this mock"); in verify_no_more_invocations()
|
D | StrictnessPerStubbingTest.java | 228 .hasMessageContaining("1. -> ") in unnecessary_stubbing() 231 .isNot(TestBase.hasMessageContaining("2. ->")); in unnecessary_stubbing() 261 .hasMessageContaining("1. ->") in verify_no_more_invocations() 262 .hasMessageContaining("2. [?]->"); in verify_no_more_invocations()
|
/external/mockito/src/test/java/org/mockitousage/constructor/ |
D | CreatingMocksWithConstructorTest.java | 94 assertThat(e).hasMessageContaining("constructorArgs should not be null. " + in can_spy_abstract_classes_with_null_varargs() 118 …assertThat(e.getCause()).hasMessageContaining("Please ensure the target class has a 0-arg construc… in explains_constructor_exceptions() 135 …assertThat(e.getCause()).hasMessageContaining("Please ensure that the target class has a 0-arg con… in exception_message_when_constructor_not_found() 225 … .hasMessageContaining("Multiple constructors could be matched to arguments of types " in fail_when_multiple_matching_constructors_with_inheritence() 228 ….hasMessageContaining("If you believe that Mockito could do a better job deciding on which constru… in fail_when_multiple_matching_constructors_with_inheritence() 245 assertThat(e.getCause()).hasMessageContaining( in mocking_inner_classes_with_wrong_outer_instance()
|
/external/mockito/src/test/java/org/mockito/internal/creation/bytebuddy/ |
D | InlineByteBuddyMockMakerTest.java | 100 assertThat(e).hasMessageContaining("Could not modify all classes"); in should_throw_exception_redefining_unmodifiable_class() 113 assertThat(e).hasMessageContaining("Arrays cannot be mocked"); in should_throw_exception_redefining_array() 135 .hasMessageContaining("Unsupported settings") in should_fail_at_creating_a_mock_of_a_final_class_with_explicit_serialization() 136 .hasMessageContaining("serialization") in should_fail_at_creating_a_mock_of_a_final_class_with_explicit_serialization() 137 .hasMessageContaining("extra interfaces"); in should_fail_at_creating_a_mock_of_a_final_class_with_explicit_serialization() 152 .hasMessageContaining("Unsupported settings") in should_fail_at_creating_a_mock_of_a_final_class_with_extra_interfaces() 153 .hasMessageContaining("serialization") in should_fail_at_creating_a_mock_of_a_final_class_with_extra_interfaces() 154 .hasMessageContaining("extra interfaces"); in should_fail_at_creating_a_mock_of_a_final_class_with_extra_interfaces()
|
/external/mockito/src/test/java/org/mockitoutil/ |
D | ClassLoadersTest.java | 48 assertThat(e).hasMessageContaining(CLASS_NAME_DEPENDING_ON_INTERFACE); in isolated_class_loader_cannot_load_classes_if_no_code_source_path() 66 assertThat(e).hasMessageContaining("org/mockitoutil/ClassLoadersTest$Interface1"); in isolated_class_loader_cannot_load_classes_if_dependent_classes_do_not_match_the_prefixes() 120 assertThat(e).hasMessageContaining("org.mockitoutil") in isolated_class_loader_cannot_load_classes_if_prefix_excluded() 121 .hasMessageContaining(AClass.class.getName()); in isolated_class_loader_cannot_load_classes_if_prefix_excluded() 329 .hasMessageContaining("AClass"); in cannot_load_runnable_in_given_classloader_if_some_type_cant_be_loaded()
|
/external/mockito/src/test/java/org/mockitousage/junitrule/ |
D | VerificationCollectorImplTest.java | 55 assertThat(error).hasMessageContaining("1. Wanted but not invoked:"); in should_collect_multiple_verification_failures() 56 assertThat(error).hasMessageContaining("2. Wanted but not invoked:"); in should_collect_multiple_verification_failures() 90 assertThat(error).hasMessageContaining("1. Wanted but not invoked:"); in assertAtLeastOneFailure()
|
/external/mockito/src/test/java/org/mockitousage/matchers/ |
D | CustomMatchersTest.java | 130 assertThat(e).hasMessageContaining("<String that contains xxx>"); in shouldCustomMatcherPrintDescriptionBasedOnName() 156 .hasMessageContaining("<custom argument matcher>") in shouldAnonymousCustomMatcherPrintDefaultDescription() 157 .hasMessageContaining("foo"); in shouldAnonymousCustomMatcherPrintDefaultDescription()
|
/external/mockito/src/test/java/org/mockito/internal/stubbing/defaultanswers/ |
D | ReturnsSmartNullsTest.java | 84 .hasMessageContaining("oompa") in should_print_the_parameters_on_SmartNullPointerException_message() 85 .hasMessageContaining("lumpa"); in should_print_the_parameters_on_SmartNullPointerException_message()
|