Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/05-testing-with-spring.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ Test 库中非常实用的工具,在测试过程中用于操作、统计表中
**2. ReflectionTestUtils**

在测试中不可避免地要对私有属性、方法进行操作,这可以使用 PowerMock 等工具来完成,但是大部分情况下没有必要引入这么多库。其实 Spring
Test 库也丙置了一个工具,可通过反射简化此类操作。
Test 库也内置了一个工具,可通过反射简化此类操作。

例如,给私有属性设置新的值:

Expand Down