• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Model.TestCounts类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中fitSharp.Fit.Model.TestCounts的典型用法代码示例。如果您正苦于以下问题:C# TestCounts类的具体用法?C# TestCounts怎么用?C# TestCounts使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TestCounts类属于fitSharp.Fit.Model命名空间,在下文中一共展示了TestCounts类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MarkCellWithCounts

 void MarkCellWithCounts(Cell target, TestCounts beforeCounts)
 {
     string style = Processor.TestStatus.Counts.Subtract(beforeCounts).Style;
     if (!string.IsNullOrEmpty(style) && string.IsNullOrEmpty(target.GetAttribute(CellAttribute.Status))) {
         target.SetAttribute(CellAttribute.Status, style);
     }
 }
开发者ID:JeffryGonzalez,项目名称:fitsharp,代码行数:7,代码来源:ExecuteDefault.cs


示例2: WriteTest

 public void WriteTest(Tree<Cell> test, TestCounts counts)
 {
     var tables = (Parse) test.Branches[0];
     for (var table = tables; table != null; table = table.More) {
         CopyTable(table);
     }
 }
开发者ID:JeffryGonzalez,项目名称:fitsharp,代码行数:7,代码来源:StoryTestCopyWriter.cs


示例3: SuiteRunner

 public SuiteRunner(Memory memory, ProgressReporter theReporter, Func<Memory, CellProcessor> newService)
 {
     TestCounts = new TestCounts();
     myReporter = theReporter;
     this.memory = memory;
     this.newService = newService;
 }
开发者ID:jediwhale,项目名称:fitsharp,代码行数:7,代码来源:SuiteRunner.cs


示例4: CheckCounts

 public static void CheckCounts(TestCounts counts, int right, int wrong, int ignore, int exception)
 {
     Assert.AreEqual(right, counts.GetCount(TestStatus.Right));
     Assert.AreEqual(wrong, counts.GetCount(TestStatus.Wrong));
     Assert.AreEqual(ignore, counts.GetCount(TestStatus.Ignore));
     Assert.AreEqual(exception, counts.GetCount(TestStatus.Exception));
 }
开发者ID:nhajratw,项目名称:fitsharp,代码行数:7,代码来源:TestUtils.cs


示例5: MarkCellWithCounts

 void MarkCellWithCounts(TestCounts beforeCounts)
 {
     string style = processor.TestStatus.Counts.Subtract(beforeCounts).Style;
     if (!string.IsNullOrEmpty(style) && string.IsNullOrEmpty(Cells.Value.GetAttribute(CellAttribute.Status))) {
         Cells.Value.SetAttribute(CellAttribute.Status, style);
     }
 }
开发者ID:nhajratw,项目名称:fitsharp,代码行数:7,代码来源:InvokeOperation.cs


示例6: MarkCellWithCounts

 void MarkCellWithCounts(ExecuteParameters parameters, TestCounts beforeCounts)
 {
     string style = Processor.TestStatus.Counts.Subtract(beforeCounts).Style;
     if (!string.IsNullOrEmpty(style) && string.IsNullOrEmpty(parameters.Cell.GetAttribute(CellAttribute.Status))) {
         parameters.Cell.SetAttribute(CellAttribute.Status, style);
     }
 }
开发者ID:narkedboy,项目名称:fitsharp,代码行数:7,代码来源:ExecuteDefault.cs


示例7: Input

 void Input(ExecuteContext context, ExecuteParameters parameters)
 {
     var beforeCounts = new TestCounts(Processor.TestStatus.Counts);
     Processor.InvokeWithThrow(context.SystemUnderTest, GetMemberName(parameters.Members),
                      new CellTree(parameters.Cells));
     MarkCellWithLastResults(parameters, p => MarkCellWithCounts(p, beforeCounts));
 }
开发者ID:narkedboy,项目名称:fitsharp,代码行数:7,代码来源:ExecuteDefault.cs


示例8: WriteTest

 public void WriteTest(Tree<Cell> test, TestCounts counts) {
     if (!writesTables) {
         var testResult = processor.ParseTree<Cell, StoryTestString>(test).ToString();
         if (!string.IsNullOrEmpty(testResult)) HandleTableResult(testResult);
     }
     handleCounts(counts);
     Counts = counts;
 }
开发者ID:GibSral,项目名称:fitsharp,代码行数:8,代码来源:StoryTestStringWriter.cs


示例9: WriteCounts

 void WriteCounts(TestCounts summary, string tag) {
     writer.WriteStartElement(tag);
     writer.WriteElementString("right", summary.GetCount(TestStatus.Right).ToString());
     writer.WriteElementString("wrong", summary.GetCount(TestStatus.Wrong).ToString());
     writer.WriteElementString("ignores", summary.GetCount(TestStatus.Ignore).ToString());
     writer.WriteElementString("exceptions", summary.GetCount(TestStatus.Exception).ToString());
     writer.WriteEndElement();
 }
开发者ID:GibSral,项目名称:fitsharp,代码行数:8,代码来源:XmlResultWriter.cs


示例10: FormatCounts

		public static String FormatCounts(TestCounts status)
		{
			var builder = new StringBuilder();
			builder.Append(FormatInteger(0));
			builder.Append(FormatInteger(status.GetCount(TestStatus.Right)));
			builder.Append(FormatInteger(status.GetCount(TestStatus.Wrong)));
			builder.Append(FormatInteger(status.GetCount(TestStatus.Ignore)));
			builder.Append(FormatInteger(status.GetCount(TestStatus.Exception)));
			return builder.ToString();
		}
开发者ID:GibSral,项目名称:fitsharp,代码行数:10,代码来源:Protocol.cs


示例11: HandleFinalCount

 public void HandleFinalCount(TestCounts summary)
 {
     if(verbose)
     {
         output.WriteLine();
         output.WriteLine("Test Pages: " + pageCounts.Description);
         output.WriteLine("Assertions: " + summary.Description);
     }
     resultWriter.WriteFinalCount(summary);
 }
开发者ID:russelyang,项目名称:fitsharp,代码行数:10,代码来源:TestRunner.cs


示例12: Do

 public TypedValue Do()
 {
     var beforeCounts = new TestCounts(processor.TestStatus.Counts);
     var targetObjectProvider = Target.Value as TargetObjectProvider;
     string name = GetMemberName(Member);
     TypedValue result = processor.Invoke(
             targetObjectProvider != null ? new TypedValue(targetObjectProvider.GetTargetObject()) : Target,
             name, Parameters);
     MarkCellWithLastResults(beforeCounts);
     return result;
 }
开发者ID:nhajratw,项目名称:fitsharp,代码行数:11,代码来源:InvokeOperation.cs


示例13: Execute

 public TypedValue Execute(object systemUnderTest, Tree<Cell> memberName, Tree<Cell> parameters, Cell targetCell)
 {
     var beforeCounts = new TestCounts(Processor.TestStatus.Counts);
     var targetObjectProvider = systemUnderTest as TargetObjectProvider;
     var name = Processor.ParseTree<Cell, MemberName>(memberName).ToString();
     var result = Processor.Invoke(
             new TypedValue(targetObjectProvider != null ? targetObjectProvider.GetTargetObject() : systemUnderTest),
             name, parameters);
     MarkCellWithLastResults(new CellTree(targetCell), p => MarkCellWithCounts(p, beforeCounts));
     return result;
 }
开发者ID:JeffryGonzalez,项目名称:fitsharp,代码行数:11,代码来源:ExecuteDefault.cs


示例14: Do

        public void Do(Tree<Cell> cell) {
            var instance = new TypedValue(targetProvider.GetTargetObject());
            if (cell.IsLeaf && cell.Value.Text.Length == 0) {
	            var actual = processor.Invoke(instance, GetMemberName(memberCell), new CellTree());
	            if (actual.IsValid) ShowActual(cell.Value, actual.Value);
            }
            else {
                var beforeCounts = new TestCounts(processor.TestStatus.Counts);
                processor.InvokeWithThrow(instance, GetMemberName(memberCell), new CellTree(cell));
                processor.TestStatus.MarkCellWithLastResults(cell.Value, beforeCounts);
            }
        }
开发者ID:GibSral,项目名称:fitsharp,代码行数:12,代码来源:Binding.cs


示例15: Invoke

 TypedValue Invoke(ExecuteContext context, ExecuteParameters parameters)
 {
     var beforeCounts = new TestCounts(Processor.TestStatus.Counts);
     TypedValue target = context.Target.Value;
     var targetObjectProvider = target.Value as TargetObjectProvider;
     string name = GetMemberName(parameters.Members);
     TypedValue result = Processor.Invoke(
             targetObjectProvider != null ? new TypedValue(targetObjectProvider.GetTargetObject()) : target,
             name, parameters.Parameters);
     MarkCellWithLastResults(parameters, p => MarkCellWithCounts(p, beforeCounts));
     return result;
 }
开发者ID:narkedboy,项目名称:fitsharp,代码行数:12,代码来源:ExecuteDefault.cs


示例16: SpecifyWriter

 private void SpecifyWriter(Tree<Cell> theTables, TestCounts counts)
 {
     var tables = (Parse) theTables.Value;
     for (Parse table = tables; table != null; table = table.More) {
         Parse newTable = table.Copy();
         if (resultTables == null) {
             resultTables = newTable;
         }
         else {
             resultTables.Last.More = newTable;
         }
     }
 }
开发者ID:vaibhavsapre,项目名称:fitsharp,代码行数:13,代码来源:SpecifyFixture.cs


示例17: SaveTestResult

 private void SaveTestResult(Tree<Cell> theTables, TestCounts counts)
 {
     var tables = (Parse) theTables.Branches[0];
     for (Parse table = tables; table != null; table = table.More) {
         Parse newTable = table.Copy();
         if (resultTables == null) {
             resultTables = newTable;
         }
         else {
             resultTables.Last.More = newTable;
         }
     }
 }
开发者ID:nhajratw,项目名称:fitsharp,代码行数:13,代码来源:StoryTestFixture.cs


示例18: MakeTestCounts

 public static TestCounts MakeTestCounts() {
     var counts = new TestCounts();
     counts.AddCount(TestStatus.Right);
     counts.AddCount(TestStatus.Wrong);
     counts.AddCount(TestStatus.Wrong);
     counts.AddCount(TestStatus.Ignore);
     counts.AddCount(TestStatus.Ignore);
     counts.AddCount(TestStatus.Ignore);
     counts.AddCount(TestStatus.Exception);
     counts.AddCount(TestStatus.Exception);
     counts.AddCount(TestStatus.Exception);
     counts.AddCount(TestStatus.Exception);
     return counts;
 }
开发者ID:ChrisBDFA,项目名称:fitsharp,代码行数:14,代码来源:TestUtils.cs


示例19: Execute

 public TypedValue Execute(object systemUnderTest, Tree<Cell> memberName, Tree<Cell> parameters, Cell targetCell) {
     var beforeCounts = new TestCounts(Processor.TestStatus.Counts);
     var targetObjectProvider = systemUnderTest as TargetObjectProvider;
     var name = Processor.ParseTree<Cell, MemberName>(memberName);
     TypedValue result;
     Processor.Get<Logging>().BeginCell(targetCell);
     try {
         result = Processor.Invoke(
             new TypedValue(targetObjectProvider != null
                                ? targetObjectProvider.GetTargetObject()
                                : systemUnderTest),
             name, parameters);
     }
     finally {
         Processor.Get<Logging>().EndCell(targetCell);
     }
     Processor.TestStatus.MarkCellWithLastResults(targetCell, beforeCounts);
     return result;
 }
开发者ID:GibSral,项目名称:fitsharp,代码行数:19,代码来源:ExecuteDefault.cs


示例20: TestResult

        public TestResult(Folder folder, TestFile file)
        {
            this.file = file;
            if (file.IsFolder) return;

            var path = file.FileName + ".html";
            if (!folder.Pages.Contains(path)) return;

            using (var input = folder.Pages[path].Reader) {
                var line = input.ReadLine();
                if (line.Length < 8) return;
                var content = line.Substring(4, line.Length - 7).Split(',');
                if (content.Length < 5) return;
                runTime = content[0];
                counts = new TestCounts();
                counts.SetCount(TestStatus.Right, int.Parse(content[1]));
                counts.SetCount(TestStatus.Wrong, int.Parse(content[2]));
                counts.SetCount(TestStatus.Ignore, int.Parse(content[3]));
                counts.SetCount(TestStatus.Exception, int.Parse(content[4]));
            }
        }
开发者ID:jediwhale,项目名称:fitsharp,代码行数:21,代码来源:TestResult.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# RDL.Expression类代码示例发布时间:2022-05-26
下一篇:
C# fit.Parse类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap