我对TemplateLibrary有点困惑。我的理解是,它本质上是重复使用锅炉板代码。我不明白的是,fitnesse是如何决定在下拉列表中包含哪些页面的。如果我们看一下以下几点:

所有突出显示的内容都出现在下拉列表中。所有谈论兄弟和叔叔的事情(也许我不理解兄弟和叔叔的概念)-
These pages act as a marker to find templates to show as available for insertion when editing a page. All children of a TemplateLibrary will be shown in the drop-down list of templates available for insertion. Unlike the other special pages, all brother and uncle TemplateLibrary pages are included. The oldest (grandest uncle) is included first. The brother, if it exists, is included last. This allows younger TemplateLibrary pages to override older oneshttp://www.fitnesse.org/FitNesse.UserGuide.WritingAcceptanceTests.SpecialPages
长话短说-它是如何决定哪些是包括在下拉列表中?
发布于 2015-07-11 07:01:44
我相信TemplateLibrary的所有直接子类都包含在下拉列表中,正如您突出显示的那样。
但是,在一个页面层次结构中可能有多个称为TemplateLibrary的页面。您显示的是整个wiki的根,但是您可以添加其他的(通过添加一个页面并给它一个特殊的名称'TemplateLibrary')。兄弟和叔叔们谈论的是哪个模板库页面与wiki中的哪个页面相关(类似于Slim处理ScenarioLibrary页面的方式)。换句话说:页面被视为模板的子页面。
例如,给定以下层次结构:
+ TemplateLibrary
++ Template1
+ WebTests
++ HomePageTest
+ SoapTests
++ TemplateLibrary
+++ Template2
++ Service1Tests
+++ TemplateLibrary
++++ Template3
+++ MyService1Test当您在根级或WebTests下添加页面时,Template1是可用的。当您在SoapTests下添加页面时,Template1和Template2是可用的。当您在Service1Tests下添加页面时,Template1、Template2和Template3是可用的。
如果Service1Tests下的Service1Tests将有一个名为Template1的子页面,那么在Service1Tests下为新页面选择Template1将使用该页面,而不是根级别的页面。
https://stackoverflow.com/questions/31278677
复制相似问题