MockitoJava

234 posts

MockitoJava banner
MockitoJava

MockitoJava

@MockitoJava

Tasty mocking framework for unit tests in Java https://t.co/cJGPhK1hyn

Katılım Temmuz 2016
6 Takip Edilen3.8K Takipçiler
MockitoJava retweetledi
Tim van der Lippe
Tim van der Lippe@TimvdLippe·
Currently, all PRs to @MockitoJava are blocked because of a Java 8 build issue. Are you looking to contribute to an open source project? I would be delighted to help you out. Some instructions and options are listed here: github.com/mockito/mockit…
English
1
3
11
0
MockitoJava
MockitoJava@MockitoJava·
It's a tough time to focus on tech. We, the Mockito team, stand with Ukraine. If you can help, please do! helpukrainewin.org
English
2
9
39
0
MockitoJava
MockitoJava@MockitoJava·
@RohanSutar1616 Please file a GitHub issue with exception stacktrace and we can take a look.
English
0
0
0
0
MockitoJava
MockitoJava@MockitoJava·
Mockito 4.1.0 ships a new major feature: `@DoNotMock`. You can now mark classes/interfaces with @org.mockito.DoNotMock to disallow mocking with Mockito. For more information, see our documentation: javadoc.io/doc/org.mockit…
English
2
11
29
0
MockitoJava
MockitoJava@MockitoJava·
@bukamabish Yes, for now you will still require to specify the separate inline mockmaker. We are still monitoring the evolution in the JDK and how that affects the older subclass mockmaker before we are changing the default. Therefore, Mockito 4 didn't change the default just yet.
English
0
0
1
0
MockitoJava retweetledi
Andrei Solntsev
Andrei Solntsev@asolntsev·
@MockitoJava Thank you! We upgraded to Mockito 4.0.0 in several projects - works like a charm (both on Java 11 and Java 17).
English
0
1
7
0
MockitoJava
MockitoJava@MockitoJava·
We have just published Mockito 4.0.0 to Maven Central! The 4.0.0 release removes all previously deprecated APIs. There are no other breaking changes or otherwise functional changes compared to Mockito 3.12.4 For an overview of now removed APIs, please see github.com/mockito/mockit…
English
1
27
89
0
MockitoJava
MockitoJava@MockitoJava·
Are you an Android developer who uses Mockito? To avoid regressions for our Android users, we are looking to add a small regression test suite (our 3.11.x releases had several issues). If you would like to contribute to open source, the place to start is github.com/mockito/mockit…
English
0
1
5
0
MockitoJava
MockitoJava@MockitoJava·
We want to thank @n_haarman for the original idea, creation and maintenance of mockito-kotlin.
English
0
0
7
0
MockitoJava
MockitoJava@MockitoJava·
The mockito-kotlin artifact has migrated to the Mockito GitHub organisation and is now published at "org.mockito.kotlin:mockito-kotlin" on Maven Central. We also published version 3.0.0 that upgrades to Mockito 3 and migrates to ArgumentMatchers: github.com/mockito/mockit…
English
1
12
25
0
MockitoJava
MockitoJava@MockitoJava·
@beatngu1101 @maciejwalkowiak Please note that we don't publish all releases to Maven Central. We tend to publish to the central repository about once a month. Publishing releases to a separate repository aids in triaging and obtaining early feedback from users who do use new releases immediately.
English
0
0
3
0
Daniel Kraus
Daniel Kraus@beatngu1101·
@maciejwalkowiak @MockitoJava is similar, sometimes multiple releases per day. Impressive, but personally I prefer less frequent releases when it comes to libraries.
Daniel Kraus tweet media
English
1
0
0
0
Maciej Walkowiak 🍃
Maciej Walkowiak 🍃@maciejwalkowiak·
Most OSS libraries gets released every few months. AWS SDK for Java on the other hand every few days. As a library user, what's your preferred release schedule?
Maciej Walkowiak 🍃 tweet media
English
8
1
14
0
MockitoJava
MockitoJava@MockitoJava·
Please be aware of future JDK releases that can break your test if you are using `mockito-core`. Mockito is ready for the future with the `mockito-inline` artifact, which enables the future-proof inline mockmaker. We recommend switching the artifact if you run into these issues.
English
2
25
67
0
MockitoJava retweetledi
Tim van der Lippe
Tim van der Lippe@TimvdLippe·
Mockito is open source and looking for developers working in the Android ecosystem who can help us out with a solution: #issuecomment-688446064" target="_blank" rel="nofollow noopener">github.com/mockito/mockit…
Tim van der Lippe@TimvdLippe

If there is one thing I have learned about Mockito 2, is that the large number of breaking changes involved can cause a lot of pain for your users. I am trying to prevent that from reoccurring, yet I feel like I am missing knowledge to do so and it inevitably happens yet again.

English
1
5
5
0
MockitoJava
MockitoJava@MockitoJava·
For our Android users, we just published version 3.5.2 to Maven Central which should fix the issue with your build (which broke with 3.5.0). Please upgrade and let us know if there are any other issues.
Andranik Azizbekian@_azizbekian

@rafaelcodes, after upgrading from mockito 3.4.6 to 3.5.0 test are not able to be run. Is that connected with my setup? Or is there in issue in the release?

English
0
1
0
0
MockitoJava retweetledi
Tim van der Lippe
Tim van der Lippe@TimvdLippe·
This is my number one question for the Java ecosystem: how does a (popular) library support modern Java (8+) while not breaking Android support? We have hit this numerous times with Mockito, but surely we cant be the only ones?
English
0
2
6
0
MockitoJava
MockitoJava@MockitoJava·
Mockito is now fully ready for the future.
English
2
8
41
0
MockitoJava retweetledi
Oliver Libutzki
Oliver Libutzki@OliverLibutzki·
With static mocks you can ensure that the current DateTime is used by your code. In my opinion use cases for static mocking are rare, but this is an example which shows that it can help you a lot in certain situations. Thanks @MockitoJava and @rafaelcodes
Oliver Libutzki tweet media
English
2
7
39
0
MockitoJava
MockitoJava@MockitoJava·
@bhardwaj_rish That's a fair point. Do you mind opening a PR to update the docs with better examples?
English
0
0
1
0
rish
rish@rish_space·
@MockitoJava from your docs > In reality, please don't mock the List class. Use a real instance instead. ..followed by a page full of examples mocking the List class. Why do this? Why not give a solid example where people learn how you intend Mockito to be used?
English
1
0
0
0