Skip to content

Commit

Permalink
补充单测
Browse files Browse the repository at this point in the history
  • Loading branch information
funkygao committed Jul 28, 2023
1 parent 490af03 commit 956ba5b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,18 @@ public void decideSteps() {
// B2BDecideStepsExt
List<String> b2bSubmitSteps = DDD.useRouter(DecideStepsRouter.class).decideSteps(fooModel, Steps.Submit.Activity);
assertEquals(3, b2bSubmitSteps.size());

try {
DDD.useRouter(DecideStepsRouter.class).decideSteps(null, Steps.Submit.Activity);
fail();
} catch (NullPointerException expected) {
}
try {
DDD.useRouter(DecideStepsRouter.class).defaultExtension(null);
fail();
} catch (NullPointerException expected) {

}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.github.dddplus.runtime.registry;

import org.junit.Assert;
import org.junit.Test;

public class InterceptorDefTest {

@Test
public void basic() {
InterceptorDef interceptorDef = new InterceptorDef();
try {
interceptorDef.registerBean(null);
Assert.fail();
} catch (NullPointerException expected) {

}
}

}

0 comments on commit 956ba5b

Please sign in to comment.