从上一个问题(Recipe must be able to instantiate via RecipeIntrospectionUtils)继续,我简化了食谱和测试(见https://github.com/thomasrobertz/gd-refactor-sb3/tree/master) 但测试失败了:
java.lang.AssertionError: [de.robertz.SayHelloRecipe description should end with a period.]
Expecting actual:
"HelloDesc"
to end with:
"."
"HelloDesc"由我的食谱的方法覆盖返回:
@Override
public String getDescription() {
return "HelloDesc";
}
永远不会调用getVisitor()
覆盖.
这个测试似乎已经准备好了,但有些地方不对劲.
这可能解释了早先RecipeIntrospectionUtils失败的原因.
也许通过这些指点,有人能够对这个问题做出一些解释?