Mockito.mockStaticを使ったのにcloseしないのは時限爆弾を仕込むようなものだよ、というお話
https://qiita.com/moromi25/items/61a8ae8750bec3078c10?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #Mockito #AutoCloseable #junit5 #やらかし #MockedStatic
#qiita #mockito #autocloseable #junit5 #やらかし #mockedstatic
Use an overload of the mock() method in Mockito to eliminate those pesky generic warnings:
https://medium.com/pragmatic-programmers/taming-a-silly-generic-warning-81e127c286db
Get the book by @kenkousen: https://pragprog.com/titles/mockito/mockito-made-clear/
Statische Methoden mocken mit Mockito
Hin und wieder entdeckt man als Software Entwickler ein Feature in einer Bibliothek wieder, dass man schon zweimal vergessen hat. Wenn man dieses wiederentdeckte Wissen mit einem Kollegen teilen kann, dann ist es nicht nur schön sondern verbessert auch noch die Qualität der täglichen Arbeit.
https://schegge.de/2023/06/statische-methoden-mocken-mit-mockito/
#bestpractices #java #test #Junit #mockito #unittest
@kenkousen explains why Mockito’s ArgumentMatchers class needs an eq method:
https://medium.com/pragmatic-programmers/gotta-mock-em-all-8ac78ea9971a
Pick up the book:
https://pragprog.com/titles/mockito/mockito-made-clear/
#book #mockito #java #testing #tdd
JDK 21 will add a warning if agent are loaded dynamically (JEP 451). Later versions may require to add `-XX:+EnableDynamicAgentLoading `. This increases security, on the other hand this also prevents some use cases without the flag: like tests with #Mockito, ad-hoc troubleshooting, among others.
Learn about using a delay when verifying a method call on a mock In Mockito:
https://medium.com/pragmatic-programmers/dont-verify-that-mock-yet-781c924670f
Ken's @kenkousen Mockito ebook is available at half price for a few more days with code SPRING2023:
https://pragprog.com/titles/mockito/mockito-made-clear/
Some tips from @kenkousen on using Mockito’s inline mock maker to test Java classes whose dependencies are either final classes or classes containing final methods:
https://medium.com/pragmatic-programmers/mocking-final-classes-and-methods-fc0c89143744
Ken's book:
https://pragprog.com/titles/mockito/mockito-made-clear/
#java #testing #mockito #TDD
What's the difference between Mockito and BDDMockito? @kenkousen explains in this article:
https://medium.com/pragmatic-programmers/mockito-versus-bddmockito-4acc3e232134
Follow along with a simple Java project from @kenkousen that uses Mockito for testing:
https://medium.com/pragmatic-programmers/a-simple-modern-mockito-project-b057d0f4f36c
Ken's book:
A post about software versioning and Mockito from @kenkousen:
https://medium.com/pragmatic-programmers/mockito-where-everything-is-made-up-and-the-versions-dont-matter-6770b8f96551
Ken's book:
https://pragprog.com/titles/mockito/mockito-made-clear/
#software #testing #tdd #java #mockito
Why spy on your dependencies? Ken Kousen explains:
https://medium.com/pragmatic-programmers/i-spy-with-my-little-mockito-3ea8748cb800
Ken's book:
https://pragprog.com/titles/mockito
Video version of Tales from the jar side, about my new Mockito video, Reactive Spring, and tweets and toots #java #Mockito #Spring #talesfromthejarside
https://youtu.be/DB1qP97Jv6g
#java #mockito #spring #talesfromthejarside
Tales from the jar side: A new Mockito video, Reacting to Reactive Spring, and Tweets and Toots #java #mockito #testing
https://kenkousen.substack.com/p/tales-from-the-jar-side-setting-up?utm_source=mastodon&sd=pf
Setting up Mockito https://youtu.be/ylIQGVGLtQs in a Java project, using both Gradle and/or Maven #Java #Mockito #gradle #maven #TalesFromTheJarSide
#java #mockito #gradle #maven #talesfromthejarside
Create a mock to verify that an algorithm is implemented properly to see how mocks can help you to test Java code:
Pick up Ken's @kenkousen Mockito book:
https://pragprog.com/titles/mockito
This week's Tales from the jar side includes a new Mockito video, my appearance at CodeRanch, a note about saving daylight at the South Pole, how AI tools are a blurry JPEG of the web, and assorted tweets and toots #java #mockito #chatgpt
https://kenkousen.substack.com/p/tales-from-the-jar-side-new-mockito?utm_source=mastodon&sd=pf
New video: How Mockito Mocks Help, https://youtu.be/McSfk595N1I
#java #mockito #testing #TalesFromTheJarSide
#java #mockito #testing #talesfromthejarside
Video version of Tales from the jar side now available! What it means when no one makes the first jump, LTS versions of Java, a new Mockito video, and other tweets and toots #java #mockito https://youtu.be/6GUbsu4h9fg
Tales from the jar side, this week about how if nobody makes the first jump, it's a bad test, a comment on Java LTS versions, the temptations of curmudgeon mode, a new Mockito video, and other tweets and toots
#Java #Mockito #teaching
https://kenkousen.substack.com/p/tales-from-the-jar-side-no-one-makes?utm_source=mastodon&sd=pf
RT @kenkousen
Why Use Mockito At All? A new "Tales from the jar side" video from @kenkousen #Java #Mockito #testing
https://youtu.be/IRYYL61-GNk