本文整理汇总了C#中StoryTeller.Model.FixtureLibrary类的典型用法代码示例。如果您正苦于以下问题:C# FixtureLibrary类的具体用法?C# FixtureLibrary怎么用?C# FixtureLibrary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FixtureLibrary类属于StoryTeller.Model命名空间,在下文中一共展示了FixtureLibrary类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreatePlan
public IExecutionStep CreatePlan(Step step, FixtureLibrary library)
{
return new SilentAction("Grammar", _position, _action, step)
{
Subject = Key
};
}
示例2: CreatePlan
public void CreatePlan(FixtureLibrary library)
{
performAction(() =>
{
Plan = Specification.CreatePlan(library);
});
}
示例3: ToStructure
public GrammarStructure ToStructure(FixtureLibrary library)
{
return new SetVerification(_labelName, _leafName, cells())
{
Ordered = Ordered
};
}
示例4: OutlineTreeBuilder
public OutlineTreeBuilder(Test test, FixtureLibrary library, IOutlineConfigurer configurer)
{
var workspace = test.GetWorkspace();
_library = library.Filter(workspace.CreateFixtureFilter().Matches);
_test = test;
_configurer = configurer;
}
示例5: CreatePlan
public IExecutionStep CreatePlan(Step step, FixtureLibrary library, bool inTable = false)
{
return new SilentAction("Grammar", Position, _action, step)
{
Subject = Key
};
}
示例6: copies_grammars
public void copies_grammars()
{
const string fixtureKey = "a key";
var lib = new FixtureLibrary();
var original = new FixtureModel(fixtureKey);
lib.Models[fixtureKey] = original;
original.AddGrammar(new Sentence { key = "sentence", format = "a format"});
var overrides = new FixtureLibrary();
var overriden = new FixtureModel(fixtureKey);
overrides.Models[fixtureKey] = overriden;
var result = lib.ApplyOverrides(overrides);
result.Models.Count.ShouldBe(1);
var fixture = result.Models[fixtureKey];
ReferenceEquals(fixture, overrides.Models[fixtureKey]).ShouldBeFalse();
fixture.key.ShouldBe(fixtureKey);
fixture.grammars.Length.ShouldBe(1);
var sentence = fixture.grammars[0] as Sentence;
sentence.key.ShouldBe("sentence");
sentence.format.ShouldBe("a format");
}
示例7: TestEditorTag
public TestEditorTag(FixtureLibrary library)
: base("div")
{
AddClass("main");
Add("h2").AddClass(HtmlClasses.TEST_NAME);
Id("testEditor");
AddClass(HtmlClasses.TEST_EDITOR);
_container = Add("div").AddClasses("container", HtmlClasses.SECTION, "test-editor");
FixtureGraph fixture = library.BuildTopLevelGraph();
HtmlTag holder = new HolderTag(fixture).AddClass("top-level-holder");
holder.Children.Last().Render(false);
Container
.MetaData(GrammarConstants.LEAF_NAME, GrammarConstants.TEST)
.MetaData(GrammarConstants.FIXTURE, GrammarConstants.TEST)
.MetaData(GrammarConstants.SELECTION_MODE, SelectionMode.OneOrMore.ToString())
.Append(holder)
.Append(new HtmlTag("hr"));
Container.ActionLink(fixture.Policies.AddGrammarText, GrammarConstants.ADD_SECTION_ACTIVATOR);
Container.Append(new GrammarSelector(fixture).Build());
}
示例8: CreatePlan
public CompositeExecution CreatePlan(FixtureLibrary library)
{
var fixture = library.Fixtures[Key];
if (id.IsEmpty()) id = Guid.NewGuid().ToString();
return CreatePlan(library, fixture);
}
示例9: ToStructure
public GrammarStructure ToStructure(FixtureLibrary library)
{
if (library == null) throw new ArgumentNullException("library");
Cell[] cells = GetCells().Select(x => x.ToInputCell()).ToArray();
return new Sentence(Template, cells);
}
示例10: Build
public FixtureLibrary Build(ITestContext context)
{
_library = new FixtureLibrary();
context.VisitFixtures(this);
return _library;
}
示例11: should_have_a_label
public void should_have_a_label()
{
var fixture = new FactFixture();
var grammar = fixture["True"];
var fixtureLibrary = new FixtureLibrary();
var sentence = grammar.ToStructure(fixtureLibrary) as Sentence;
sentence.PartCount.ShouldEqual(1);
sentence.Parts[0].ShouldBeOfType<Label>().Text.ShouldEqual("This is true");
}
示例12: PostProcessAll
public static void PostProcessAll(IEnumerable<Specification> specs, FixtureLibrary library)
{
foreach (var spec in specs)
{
spec.ClearErrors();
var processor = new SpecificationPostProcessor(library, spec);
processor.Validate();
}
}
示例13: can_create_screen_for_fixturelibrary
public void can_create_screen_for_fixturelibrary()
{
var library = new FixtureLibrary();
var subject = _objectLocator.BuildSubject(library).ShouldBeOfType<FixtureNodeSubject>();
subject.Subject.ShouldBeTheSameAs(library);
var presenter = subject.CreateScreen(factory).ShouldBeOfType<FixtureNodePresenter>();
presenter.Subject.ShouldBeTheSameAs(library);
}
示例14: buildFixtureSelectors
private void buildFixtureSelectors(FixtureLibrary library, Cache<string, NamespaceSelector> namespaces, Cache<string, FixtureSelector> fixtures)
{
library.AllFixtures.Each(x =>
{
var item = new FixtureSelector(x);
fixtures[x.Name] = item;
namespaces[x.Namespace].Add(item);
});
}
示例15: ResolveDependencies
public override void ResolveDependencies(FixtureLibrary library)
{
var embeddedKey = fixture.key;
if (library.Models.Has(embeddedKey))
{
fixture = library.Models[embeddedKey];
}
}