mockito: Mockito 5 lab (inline mock maker, static/construction mocking, captors, BDD, strict stubs)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cfo2K4u4rF18QsPXPFnytf
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerates every file in mockito/output/.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
unset JAVA_TOOL_OPTIONS
|
||||
|
||||
# 1. The whole suite with Mockito loaded as a -javaagent (the recommended setup).
|
||||
mvn -B -q clean test
|
||||
|
||||
# 2. The same single test WITHOUT the agent, to capture what a JDK 21+ prints when Mockito self-attaches.
|
||||
mvn -B -Pno-agent test -Dtest=MockMakerTest 2>&1 \
|
||||
| grep -E '^(Mockito is currently|WARNING: (A Java agent|If a serviceability|Dynamic loading))' \
|
||||
| sed -E 's#\(/[^)]*/byte-buddy-agent-([0-9.]+)\.jar\)#(<local-repo>/byte-buddy-agent-\1.jar)#' \
|
||||
> output/14-dynamic-agent-warning.txt
|
||||
echo "done: $(ls output | wc -l) files in output/"
|
||||
Reference in New Issue
Block a user