当前位置: 首页>>代码示例>>C#>>正文


C# Model.FixtureLibrary类代码示例

本文整理汇总了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
     };
 }
开发者ID:jamesmanning,项目名称:Storyteller,代码行数:7,代码来源:SilentGrammar.cs

示例2: CreatePlan

 public void CreatePlan(FixtureLibrary library)
 {
     performAction(() =>
     {
         Plan = Specification.CreatePlan(library);
     });
 }
开发者ID:jamesmanning,项目名称:Storyteller,代码行数:7,代码来源:SpecExecutionRequest.cs

示例3: ToStructure

 public GrammarStructure ToStructure(FixtureLibrary library)
 {
     return new SetVerification(_labelName, _leafName, cells())
     {
         Ordered = Ordered
     };
 }
开发者ID:adymitruk,项目名称:storyteller,代码行数:7,代码来源:SetVerificationGrammar.cs

示例4: OutlineTreeBuilder

 public OutlineTreeBuilder(Test test, FixtureLibrary library, IOutlineConfigurer configurer)
 {
     var workspace = test.GetWorkspace();
     _library = library.Filter(workspace.CreateFixtureFilter().Matches);
     _test = test;
     _configurer = configurer;
 }
开发者ID:abombss,项目名称:storyteller,代码行数:7,代码来源:OutlineTreeBuilder.cs

示例5: CreatePlan

 public IExecutionStep CreatePlan(Step step, FixtureLibrary library, bool inTable = false)
 {
     return new SilentAction("Grammar", Position, _action, step)
     {
         Subject = Key
     };
 }
开发者ID:storyteller,项目名称:Storyteller,代码行数:7,代码来源:SilentGrammar.cs

示例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");
        }
开发者ID:storyteller,项目名称:Storyteller,代码行数:28,代码来源:FixtureLibraryTester.cs

示例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());
        }
开发者ID:adymitruk,项目名称:storyteller,代码行数:26,代码来源:TestEditorTag.cs

示例8: CreatePlan

        public CompositeExecution CreatePlan(FixtureLibrary library)
        {
            var fixture = library.Fixtures[Key];

            if (id.IsEmpty()) id = Guid.NewGuid().ToString();

            return CreatePlan(library, fixture);
        }
开发者ID:jamesmanning,项目名称:Storyteller,代码行数:8,代码来源:Section.cs

示例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);
        }
开发者ID:GaryLCoxJr,项目名称:StoryTeller2,代码行数:8,代码来源:LineGrammar.cs

示例10: Build

        public FixtureLibrary Build(ITestContext context)
        {
            _library = new FixtureLibrary();

            context.VisitFixtures(this);

            return _library;
        }
开发者ID:wbinford,项目名称:storyteller,代码行数:8,代码来源:LibraryBuilder.cs

示例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");
 }
开发者ID:adymitruk,项目名称:storyteller,代码行数:9,代码来源:SentenceTester.cs

示例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();
     }
 }
开发者ID:storyteller,项目名称:Storyteller,代码行数:9,代码来源:SpecificationPostProcessor.cs

示例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);
        }
开发者ID:wbinford,项目名称:storyteller,代码行数:9,代码来源:ScreenObjectLocatorIntegratedTester.cs

示例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);
            });
        }
开发者ID:adymitruk,项目名称:storyteller,代码行数:10,代码来源:FixtureSelectorOrganizer.cs

示例15: ResolveDependencies

        public override void ResolveDependencies(FixtureLibrary library)
        {
            var embeddedKey = fixture.key;
            if (library.Models.Has(embeddedKey))
            {
                fixture = library.Models[embeddedKey];
            }

            
        }
开发者ID:storyteller,项目名称:Storyteller,代码行数:10,代码来源:EmbeddedSection.cs


注:本文中的StoryTeller.Model.FixtureLibrary类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。