Skip to content

Commit 1ac41d3

Browse files
committed
🐳 #345 fix inout 方法写错的问题。
1 parent 6d4ab5c commit 1ac41d3

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

common/common-core/src/main/java/com/iohao/game/action/skeleton/core/InOutManagerAbout.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
import com.iohao.game.action.skeleton.core.flow.ActionMethodInOut;
2222
import com.iohao.game.action.skeleton.core.flow.FlowContext;
2323
import lombok.AccessLevel;
24-
import lombok.Getter;
25-
import lombok.Setter;
2624
import lombok.experimental.FieldDefaults;
2725

2826
import java.util.ArrayList;
@@ -90,7 +88,7 @@ public void fuckIn(FlowContext flowContext) {
9088
}
9189

9290
for (ActionMethodInOut inOut : this.inList) {
93-
inOut.fuckOut(flowContext);
91+
inOut.fuckIn(flowContext);
9492
}
9593
}
9694

common/common-core/src/test/java/com/iohao/game/action/skeleton/core/InOutManagerTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class InOutManagerTest {
2121

2222
@Test
2323
public void test() {
24-
extracted(InOutManager.ofAbcAbc(), "ABCABC");
25-
extracted(InOutManager.ofPipeline(), "ABCCBA");
24+
extracted(InOutManager.ofAbcAbc(), "Ain Bin Cin Aout Bout Cout");
25+
extracted(InOutManager.ofPipeline(), "Ain Bin Cin Cout Bout Aout");
2626
}
2727

2828
private void extracted(InOutManager inOutManager, String result) {
@@ -36,7 +36,7 @@ private void extracted(InOutManager inOutManager, String result) {
3636
inOutManager.fuckOut(flowContext);
3737

3838
List<String> resultList = flowContext.option(resultListOption);
39-
var line = String.join("", resultList);
39+
var line = String.join(" ", resultList);
4040
Assert.assertEquals(line, result);
4141

4242
System.out.println();
@@ -48,13 +48,13 @@ class A_ActionMethodInOut implements ActionMethodInOut {
4848
@Override
4949
public void fuckIn(FlowContext flowContext) {
5050
log.info("A in");
51-
flowContext.option(InOutManagerTest.resultListOption).add("A");
51+
flowContext.option(InOutManagerTest.resultListOption).add("Ain");
5252
}
5353

5454
@Override
5555
public void fuckOut(FlowContext flowContext) {
5656
log.info("A out");
57-
flowContext.option(InOutManagerTest.resultListOption).add("A");
57+
flowContext.option(InOutManagerTest.resultListOption).add("Aout");
5858
}
5959
}
6060

@@ -63,13 +63,13 @@ class B_ActionMethodInOut implements ActionMethodInOut {
6363
@Override
6464
public void fuckIn(FlowContext flowContext) {
6565
log.info("B in");
66-
flowContext.option(InOutManagerTest.resultListOption).add("B");
66+
flowContext.option(InOutManagerTest.resultListOption).add("Bin");
6767
}
6868

6969
@Override
7070
public void fuckOut(FlowContext flowContext) {
7171
log.info("B out");
72-
flowContext.option(InOutManagerTest.resultListOption).add("B");
72+
flowContext.option(InOutManagerTest.resultListOption).add("Bout");
7373
}
7474
}
7575

@@ -78,12 +78,12 @@ class C_ActionMethodInOut implements ActionMethodInOut {
7878
@Override
7979
public void fuckIn(FlowContext flowContext) {
8080
log.info("C in");
81-
flowContext.option(InOutManagerTest.resultListOption).add("C");
81+
flowContext.option(InOutManagerTest.resultListOption).add("Cin");
8282
}
8383

8484
@Override
8585
public void fuckOut(FlowContext flowContext) {
8686
log.info("C out");
87-
flowContext.option(InOutManagerTest.resultListOption).add("C");
87+
flowContext.option(InOutManagerTest.resultListOption).add("Cout");
8888
}
8989
}

0 commit comments

Comments
 (0)