mockito-core-2.23.4.jar
登录
|
org.mockito:mockito-core:2.23.4
META-INF
org
mockito
session
package-info.java
MockitoSession.java
MockitoAnnotations.java
internal
session
package-info.java
configuration
creation
matchers
MockitoCore.java
reporting
util
InternalMockHandler.java
handler
InvocationNotifierHandler.java
MockHandlerImpl.java
NotifiedMethodInvocationReport.java
NullResultGuardian.java
MockHandlerFactory.java
listeners
exceptions
framework
runners
invocation
stubbing
debugging
progress
junit
verification
hamcrest
InOrderImpl.java
Matchers.java
configuration
creation
Captor.java
InjectMocks.java
plugins
ArgumentMatchers.java
InOrder.java
Incubating.java
BDDMockito.java
MockitoFramework.java
MockingDetails.java
quality
AdditionalMatchers.java
ArgumentCaptor.java
Spy.java
codegen
mock
NotExtensible.java
listeners
exceptions
Mockito.java
runners
invocation
CheckReturnValue.java
stubbing
Answers.java
Mock.java
ArgumentMatcher.java
junit
AdditionalAnswers.java
verification
hamcrest
MockSettings.java
MockitoDebugger.java
LICENSE
NotifiedMethodInvocationReport.java
清空
类结构
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.handler; import org.mockito.invocation.
DescribedInvocation
; import org.mockito.invocation.
Invocation
; import org.mockito.listeners.
MethodInvocationReport
; import static org.mockito.internal.matchers.
Equality
.areEqual; /** * Report on a method call */ public class
NotifiedMethodInvocationReport
implements
MethodInvocationReport
{ private final
Invocation
invocation
; private final
Object
returnedValue
; private final
Throwable
throwable
; /** * Build a new {@link org.mockito.listeners.MethodInvocationReport} with a return value. * * * @param invocation Information on the method call * @param returnedValue The value returned by the method invocation */ public
NotifiedMethodInvocationReport
(
Invocation
invocation
,
Object
returnedValue
) { this.
invocation
=
invocation
; this.
returnedValue
=
returnedValue
; this.
throwable
= null; } /** * Build a new {@link org.mockito.listeners.MethodInvocationReport} with a return value. * * * @param invocation Information on the method call * @param throwable Tha throwable raised by the method invocation */ public
NotifiedMethodInvocationReport
(
Invocation
invocation
,
Throwable
throwable
) { this.
invocation
=
invocation
; this.
returnedValue
= null; this.
throwable
=
throwable
; } public
DescribedInvocation
getInvocation
() { return
invocation
; } public
Object
getReturnedValue
() { return
returnedValue
; } public
Throwable
getThrowable
() { return
throwable
; } public boolean
threwException
() { return
throwable
!= null; } public
String
getLocationOfStubbing
() { return (
invocation
.
stubInfo
() == null) ? null :
invocation
.
stubInfo
().
stubbedAt
().
toString
(); } public boolean
equals
(
Object
o
) { if (this ==
o
) return true; if (
o
== null ||
getClass
() !=
o
.
getClass
()) return false;
NotifiedMethodInvocationReport
that
= (
NotifiedMethodInvocationReport
)
o
; return
areEqual
(
invocation
,
that
.
invocation
) &&
areEqual
(
returnedValue
,
that
.
returnedValue
) &&
areEqual
(
throwable
,
that
.
throwable
); } public int
hashCode
() { int
result
=
invocation
!= null ?
invocation
.
hashCode
() : 0;
result
= 31 *
result
+ (
returnedValue
!= null ?
returnedValue
.
hashCode
() : 0);
result
= 31 *
result
+ (
throwable
!= null ?
throwable
.
hashCode
() : 0); return
result
; } }
查找资源
Jre/Lib
输入类名或文件名
类结构窗口