コード例 #1
0
ファイル: SetVerification.cs プロジェクト: larsw/storyteller
        public bool Equals(SetVerification obj)
        {
            if (ReferenceEquals(null, obj))
            {
                return(false);
            }
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }

            if (!Equals(obj.Label, Label))
            {
                return(false);
            }
            if (!Equals(obj.LeafName, LeafName))
            {
                return(false);
            }

            if (Cells.Count != obj.Cells.Count)
            {
                return(false);
            }

            for (int i = 0; i < Cells.Count; i++)
            {
                if (!Cells[i].Equals(obj.Cells[i]))
                {
                    return(false);
                }
            }

            return(true);
        }
コード例 #2
0
        public bool Equals(SetVerification obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;

            if (!Equals(obj.Label, Label)) return false;
            if (!Equals(obj.LeafName, LeafName)) return false;

            if (Cells.Count != obj.Cells.Count) return false;

            for (int i = 0; i < Cells.Count; i++)
            {
                if (!Cells[i].Equals(obj.Cells[i])) return false;
            }

            return true;
        }
コード例 #3
0
        public void WriteSetVerificationResults(SetVerification verification, ITestContext context)
        {
            if (verification.Ordered)
            {
                _headerRow.InsertFirst(new HtmlTag("th").Text("Order"));
            }

            var results = context.ResultsFor(_step);
            results.ForExceptionText(writeExceptionText);

            var rows = results.GetResult<IList<SetRow>>(_table.LeafName) ?? new List<SetRow>();
            // TODO -- order this the right way

            rows.Each(x =>
            {
                writeVerificationResultRow(x, context, verification.Ordered);
            });
        }
コード例 #4
0
ファイル: UsageGraph.cs プロジェクト: MotherGoose/storyteller
 void ITestStream.SetVerification(SetVerification verification, IStep step)
 {
     markGrammar(verification.Name);
 }
コード例 #5
0
ファイル: FixtureTag.cs プロジェクト: wbinford/storyteller
 void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step)
 {
     writeTable(setVerification);
 }
コード例 #6
0
        void ITestStream.SetVerification(SetVerification verification, IStep step)
        {
            var holder = _document.Current.JoinTagAtEnd<TableContainerTag>();

            var tag = new StoryTellerTableTag(verification, step);
            tag.WriteSetVerificationResults(verification, _context);

            holder.Add(verification.Label, tag);
        }
コード例 #7
0
ファイル: ResultsWriter.cs プロジェクト: wbinford/storyteller
        void ITestStream.SetVerification(SetVerification verification, IStep step)
        {
            var tag = new StoryTellerTableTag(verification, step);
            tag.WriteSetVerificationResults(verification, _context);

            _document.Add(tag);
        }
コード例 #8
0
 public void SetVerification(SetVerification verification, IStep step)
 {
     withNewLeaf(step, Icon.SetVerification, node =>
     {
         node.AddText(verification.Label);
         addRearrangeCommands(node);
     });
 }
コード例 #9
0
 void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step)
 {
     _link.Label(setVerification.Label);
 }
コード例 #10
0
 void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step)
 {
     add(setVerification.Name, setVerification.Label, Icon.SetVerification);
 }
コード例 #11
0
        public void SetUp()
        {
            var runner = new TestRunner(x => { x.AddFixture<VerificationFixture>(); });

            FixtureLibrary library = runner.Library;

            verification =
                library.FixtureFor("Verification").GrammarFor("theStates").ShouldBeOfType<SetVerification>();
        }
コード例 #12
0
        protected override void theContextIs()
        {
            step = new Step().With("x", 1).With("y", 2);

            treeBuilder.StartTest(theTest);

            section = new Section("Math");

            treeBuilder.StartTest(theTest);
            treeBuilder.StartSection(section, new FixtureGraph("Math"));

            set = new SetVerification("the label of this grammar", "leaf1");

            treeBuilder.SetVerification(set, step);
        }
コード例 #13
0
ファイル: TestParser.cs プロジェクト: wbinford/storyteller
 void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step)
 {
     _stream.SetVerification(setVerification, step);
 }
コード例 #14
0
        public void when_writing_the_grammar_structure()
        {
            SetVerificationGrammar grammar = Fixture.VerifySetOf(c => new ValidationError[0])
                .Titled("the title")
                .LeafNameIs("group1")
                .MatchOn(x => x.Field, x => x.Message);

            var setVerification = grammar.ToStructure(null).ShouldBeOfType<SetVerification>();
            var expected = new SetVerification("the title", "group1", Cell.For<string>("Field"),
                                               Cell.For<string>("Message"));

            setVerification.ShouldEqual(expected);
        }
コード例 #15
0
        public void SetUp()
        {
            FixtureLibrary library = FixtureGraph.Library;

            verification =
                library.FixtureFor("Verification").GrammarFor("theStates").ShouldBeOfType<SetVerification>();
        }
コード例 #16
0
ファイル: TestParser.cs プロジェクト: larsw/storyteller
 void IGrammarVisitor.SetVerification(SetVerification setVerification, IStep step)
 {
     _stream.SetVerification(setVerification, step);
 }