File tree Expand file tree Collapse file tree 6 files changed +17
-18
lines changed
cats/src/main/scala/org/mockito/cats
macro/src/main/scala/org/mockito
scalatest/src/test/scala/user/org/mockito/captor
scalaz/src/main/scala/org/mockito/scalaz
specs2/src/test/scala/org/mockito/specs2 Expand file tree Collapse file tree 6 files changed +17
-18
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ maxColumn = 180
6
6
rewrite.rules = [RedundantBraces , RedundantParens , SortImports ]
7
7
spaces.inImportCurlyBraces = true
8
8
indentOperator.preset = spray
9
- unindentTopLevelOperators = true
10
9
11
- version =3.3 . 3
10
+ version =3.5 . 8
12
11
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ class EqToEquality[T: Eq] extends Equality[T] {
8
8
override def areEqual (a : T , b : Any ): Boolean =
9
9
(a == null && b == null ) || (
10
10
a != null &&
11
- b != null &&
12
- b.getClass == a.getClass &&
13
- a === b.asInstanceOf [T ]
11
+ b != null &&
12
+ b.getClass == a.getClass &&
13
+ a === b.asInstanceOf [T ]
14
14
)
15
15
}
Original file line number Diff line number Diff line change @@ -106,17 +106,17 @@ private[mockito] trait VerificationMacroTransformer {
106
106
q """
107
107
if (_root_.org.mockito.MockitoSugar.mockingDetails( $a).isMock) {
108
108
${called match {
109
- case q " $_.calledAgain " =>
110
- val calledPattern = show(q " $a. $b" )
111
- q """ throw new _root_.org.mockito.exceptions.misusing.NotAMockException(Seq(
109
+ case q " $_.calledAgain " =>
110
+ val calledPattern = show(q " $a. $b" )
111
+ q """ throw new _root_.org.mockito.exceptions.misusing.NotAMockException(Seq(
112
112
"[" + $calledPattern + "] is not a mock!",
113
113
"Example of correct verification:",
114
114
" myMock wasNever called",
115
115
""
116
116
).mkString("\n"))
117
117
"""
118
- case _ => transformInvocation(c)(q " $a. $b" , order, q " _root_.org.mockito.VerifyMacro.Never " )
119
- }}
118
+ case _ => transformInvocation(c)(q " $a. $b" , order, q " _root_.org.mockito.VerifyMacro.Never " )
119
+ }}
120
120
} else {
121
121
${transformMockWasNeverCalled(q " $a. $b" , called)}
122
122
}
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ class ArgCaptorTest extends AnyWordSpec with MockitoSugar with Matchers {
151
151
152
152
error.getMessage should (
153
153
include(" Got [it worked again!] instead of [it worked!]" ) and
154
- include(" Also expected 1 more: [it worked again!]" )
154
+ include(" Also expected 1 more: [it worked again!]" )
155
155
)
156
156
}
157
157
@@ -172,7 +172,7 @@ class ArgCaptorTest extends AnyWordSpec with MockitoSugar with Matchers {
172
172
173
173
error.getMessage should (
174
174
include(" Got [it worked!] instead of [it worked again!]" ) and
175
- include(" Also got 1 more: [it worked again!]" )
175
+ include(" Also got 1 more: [it worked again!]" )
176
176
)
177
177
}
178
178
}
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ class EqToEquality[T: Equal] extends Equality[T] {
8
8
override def areEqual (a : T , b : Any ): Boolean =
9
9
(a == null && b == null ) || (
10
10
a != null &&
11
- b != null &&
12
- b.getClass == a.getClass &&
13
- a === b.asInstanceOf [T ]
11
+ b != null &&
12
+ b.getClass == a.getClass &&
13
+ a === b.asInstanceOf [T ]
14
14
)
15
15
}
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ The Mockito trait is reusable in other contexts
527
527
528
528
implicit val order = inOrder(list1, list2)
529
529
(there was one(list1).get(0 ) andThen
530
- one(list2).get(0 )).message must_== " The mock was called as expected"
530
+ one(list2).get(0 )).message must_== " The mock was called as expected"
531
531
}
532
532
533
533
def order2 = {
@@ -543,7 +543,7 @@ The Mockito trait is reusable in other contexts
543
543
544
544
implicit val order = inOrder(ignoreStubs(list1, list2))
545
545
(there was one(list1).get(0 ) andThen
546
- one(list2).get(0 )).message must_== " The mock was called as expected"
546
+ one(list2).get(0 )).message must_== " The mock was called as expected"
547
547
}
548
548
549
549
def order3 = {
@@ -586,7 +586,7 @@ The Mockito trait is reusable in other contexts
586
586
587
587
implicit val order = inOrder(list1, list2)
588
588
(there was one(list2).get(0 ) andThen
589
- one(list1).get(0 )).message must startWith(" The mock was not called as expected" )
589
+ one(list1).get(0 )).message must startWith(" The mock was not called as expected" )
590
590
}
591
591
592
592
def order6 = {
You can’t perform that action at this time.
0 commit comments