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
Two weeks ago I promised a blog post about the process we use for automating code samples verification in our #evitaDB documentation and now I'm keeping that promise.
The approach described, which takes advantage of #JUnit5 dynamic testing and #JShell REPL, looks like a novel approach. I haven't been able to Google any other project that documents something similar.
So if you have a similar use case, read on and get inspired.
The documentation on #evitaDB https://evitadb.io/documentation/index is getting bigger and bigger. The more examples we add, the more we're afraid they'll become obsolete or broken. How do we tame this beast of hundreds of examples?
Fortunately, #Java provides a JShell REPL that allows you to interactively enter, and run Java source code. The JShell can also be run automatically and #JUnit5 allows to create dynamic tests. Combining these two features we've created an automated test suite. Blog post coming.
As Sam said
> Speaking of which... there are ZERO open issues for #JUnit5 5.9.3.
>
> Something is brewing! ☕️
ICYMI: Got a pre-commit hook that runs #JUnit5 tests? Try "When All Tests Were Green". It's trivial to add to your build, requires no change in human behavior, and by the end of Day 1 will have saved you more time than it cost to set up.
“Please do not use and do not advertise that extension. It's going to cause damage to your teams and others'.” — Some person who never explained why or how
“Check out my little #junit5 extension that might help you want to commit more often.” — Me
#JUnit5 wird 5! 🎉
"JUnit 5 wird 5" heute ab 18:30 mit @marcphilipp
beim virtuellen JUGF-Stammtisch. Es findet als Online-Veranstaltung auf dem Konferenzserver des Freifunk München statt: https://meet.ffmuc.net/jugfmeeting
Moved by #Java
New post: Java Interview Question 2 – Duplicate Integers and Sort https://xenonique.co.uk/blog/2023/03/20/java-interview-question-2-duplicate-integers-and-sort/ Development #java #interview #test #softwareengineer #tdd #blacktiktok #blacktechtwitter #java17 #junit5
#java #interview #test #softwareengineer #tdd #blacktiktok #BlackTechTwitter #java17 #junit5
Read this article by Per-Åke Minborg of #ChronicleSoftware on Foojay :foojay: Today and learn how to use #Java #JUnit5 in conjunction with combinations, permutations, and products!
https://foojay.io/today/exhaustive-junit5-testing-with-combinations-permutations-and-products
#chroniclesoftware #java #junit5 #foojaytip
It appears to me that #JUnit5 (Jupiter to be precise) and JLS do not agree on the relevance of `@Inherited`. 🤔
https://github.com/junit-pioneer/junit-pioneer/issues/697#issuecomment-1332177829
Atenção comedores de pudim 🍮: desde os primórdios do Java os Testes são um desafio constante na vida de programadores e do dia-a-dia das fábrica de software.
[New Blog Post] Using Testcontainers in Spring Boot Tests combined with JUnit5 for Selenium Tests
https://blog.sandra-parsick.de/2022/11/21/using-testcontainers-selenium-in-spring-boot-tests/
#TestContainer #springboot #junit5 #seleniumframework
RT @ju_derancourt@twitter.com
Envie de passer à #JUnit5 ? Découvrez comment migrer facilement vos tests avec notre tools-in-action disponible sur youtube ! 😀
@JulienTopcu@twitter.com @DevoxxFr@twitter.com
🐦🔗: https://twitter.com/ju_derancourt/status/1125841556362153985
RT @ju_derancourt@twitter.com
Envie de passer à #JUnit5 ? Découvrez comment migrer facilement vos tests avec notre tools-in-action disponible sur youtube ! 😀
@JulienTopcu@twitter.com @DevoxxFr@twitter.com
🐦🔗: https://twitter.com/ju_derancourt/status/1125841556362153985
blockygameplatform Teresology broke a 14-month dry spell with a new release recently, inspiring me to give it another spin. So I find myself writing some Java recently.
I came up with some unit-test code I'd love to have suggestions on.
The app uses JavaFX for the UI, so there are some observable beans, and I'm using ListenableFutures (from Guava) because that's the concurrency abstraction I'm most familiar with, and javafx also has an event system. Some other variants on `Future` jumbled in there too.
This code is at a point where I think it works and is reasonably readable: https://github.com/keturn/TerasologyLauncher/blob/6454f652ce2da1b7e98054c1ba9306d9f5697080/src/test/java/org/terasology/launcher/game/TestRunGameTask.java#L210
but the mishmash of different concurrency abstractions makes me want to know from more fluent java-testers if there's a more idiomatic way to write it.
#gamedev #javafx #unittests #java #junit5