mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
fix(ActionExecutorTest): repair stub in test
This commit is contained in:
@@ -67,11 +67,11 @@ class ActionExecutorTest {
|
|||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
when(cognationCapability.getChatMessages()).thenReturn(Collections.emptyList());
|
lenient().when(cognationCapability.getChatMessages()).thenReturn(Collections.emptyList());
|
||||||
when(memoryCapability.getActivatedSlices(anyString())).thenReturn(Collections.emptyList());
|
lenient().when(memoryCapability.getActivatedSlices(anyString())).thenReturn(Collections.emptyList());
|
||||||
when(actionCapability.putPhaserRecord(any(Phaser.class), any(ActionData.class)))
|
lenient().when(actionCapability.putPhaserRecord(any(Phaser.class), any(ActionData.class)))
|
||||||
.thenAnswer(inv -> new PhaserRecord(inv.getArgument(0), inv.getArgument(1)));
|
.thenAnswer(inv -> new PhaserRecord(inv.getArgument(0), inv.getArgument(1)));
|
||||||
when(actionCapability.loadMetaActionInfo(anyString())).thenAnswer(inv -> {
|
lenient().when(actionCapability.loadMetaActionInfo(anyString())).thenAnswer(inv -> {
|
||||||
MetaActionInfo info = new MetaActionInfo();
|
MetaActionInfo info = new MetaActionInfo();
|
||||||
info.setDescription("desc");
|
info.setDescription("desc");
|
||||||
info.setParams(Collections.emptyMap());
|
info.setParams(Collections.emptyMap());
|
||||||
@@ -79,8 +79,8 @@ class ActionExecutorTest {
|
|||||||
});
|
});
|
||||||
CorrectorResult correctorResult = new CorrectorResult();
|
CorrectorResult correctorResult = new CorrectorResult();
|
||||||
correctorResult.setMetaInterventionList(Collections.emptyList());
|
correctorResult.setMetaInterventionList(Collections.emptyList());
|
||||||
when(actionCorrector.execute(any())).thenReturn(correctorResult);
|
lenient().when(actionCorrector.execute(any())).thenReturn(correctorResult);
|
||||||
doNothing().when(actionCapability).handleInterventions(any(), any());
|
lenient().doNothing().when(actionCapability).handleInterventions(any(), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 场景1:B1 -> B3 -> B4 -> B7(成功) -> B10。目的:验证正常主路径与资源清理。
|
// 场景1:B1 -> B3 -> B4 -> B7(成功) -> B10。目的:验证正常主路径与资源清理。
|
||||||
|
|||||||
Reference in New Issue
Block a user