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


C# Model.TestCounts类代码示例

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


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


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