Skip to content

Commit

Permalink
Fix typo in Javadocs of MockedConstruction (mockito#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
hotire committed Jan 17, 2021
1 parent 7b940bc commit 0630886
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/mockito/Mockito.java
Expand Up @@ -1573,14 +1573,14 @@
* In the following example, the <code>Foo</code> type's construction would generate a mock:
*
* <pre class="code"><code class="java">
* assertEquals("foo", Foo.method());
* assertEquals("foo", new Foo().method());
* try (MockedConstruction<Foo> mocked = mockConstruction(Foo.class)) {
* Foo foo = new Foo();
* when(foo.method()).thenReturn("bar");
* assertEquals("bar", foo.method());
* verify(foo).method();
* }
* assertEquals("foo", foo.method());
* assertEquals("foo", new Foo().method());
* </code></pre>
*
* Due to the defined scope of the mocked construction, object construction returns to its original behavior once the scope is
Expand Down

0 comments on commit 0630886

Please sign in to comment.