public Concordion Build()
{
Check.IsFalse(this.m_BuiltAlready, "ConcordionBuilder currently does not support calling build() twice");
this.m_BuiltAlready = true;
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "run", RunCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "execute", ExecuteCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "set", new SetCommand());
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "assertEquals", AssertEqualsCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "assertTrue", AssertTrueCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "assertFalse", AssertFalseCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "verifyRows", VerifyRowsCommand);
WithApprovedCommand(HtmlFramework.NAMESPACE_CONCORDION_2007, "echo", EchoCommand);
if (Target == null)
{
Target = new FileTarget(BaseOutputDir ?? Directory.GetCurrentDirectory());
}
SetAllRunners();
SpecificationCommand.AddSpecificationListener(new BreadCrumbRenderer(this.Source));
SpecificationCommand.AddSpecificationListener(new PageFooterRenderer(this.Target));
SpecificationCommand.AddSpecificationListener(new SpecificationRenderer(this.Target));
SpecificationReader = new XmlSpecificationReader(Source, DocumentParser);
CopyResources();
AddSpecificationListeners();
foreach (var concordionBuildListener in BuildListeners)
{
concordionBuildListener.ConcordionBuilt(new ConcordionBuildEvent(Target));
}
return new Concordion(SpecificationLocator, SpecificationReader, EvaluatorFactory);
}