本文整理汇总了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);
}
}
示例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);
}
}
示例3: SuiteRunner
public SuiteRunner(Memory memory, ProgressReporter theReporter, Func<Memory, CellProcessor> newService)
{
TestCounts = new TestCounts();
myReporter = theReporter;
this.memory = memory;
this.newService = newService;
}
示例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));
}
示例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);
}
}
示例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);
}
}
示例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));
}
示例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;
}
示例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();
}
示例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();
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}