當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。