本文整理汇总了C#中Machine.Specifications.Runner.ContextInfo类的典型用法代码示例。如果您正苦于以下问题:C# ContextInfo类的具体用法?C# ContextInfo怎么用?C# ContextInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContextInfo类属于Machine.Specifications.Runner命名空间,在下文中一共展示了ContextInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: CollectReportingInformationRunListener
public CollectReportingInformationRunListener()
{
_currentAssemblyName = "";
_currentContext = null;
_contextsByAssembly = new Dictionary<string, List<ContextInfo>>();
_specificationsByContext = new Dictionary<ContextInfo, List<SpecificationInfo>>();
_resultsBySpecification = new Dictionary<SpecificationInfo, Result>();
}
开发者ID:jagregory,项目名称:machine.specifications,代码行数:8,代码来源:CollectReportingInformationRunListener.cs
示例2: OnContextEnd
public void OnContextEnd(ContextInfo context)
{
if (!_concernsToContexts.ContainsKey(context.Concern))
{
_concernsToContexts[context.Concern] = new List<Context>();
}
_concernsToContexts[context.Concern].Add(context.ToNode(_specifications));
}
开发者ID:jhollingworth,项目名称:machine.specifications,代码行数:9,代码来源:SpecificationTreeListener.cs
示例3: GetContextTime
public long GetContextTime(ContextInfo contextInfo)
{
if (_contextTimes.ContainsKey(contextInfo))
{
return _contextTimes[contextInfo];
}
return -1;
}
开发者ID:machine,项目名称:machine.specifications,代码行数:9,代码来源:TimingRunListener.cs
示例4: OnContextStart
public void OnContextStart(ContextInfo context)
{
_specifications = 0;
_errors = 0;
_successes = 0;
var notify = CreateTaskNotificationFor(context);
notify(task => _server.TaskStarting(task));
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:9,代码来源:PerAssemblyRunListener.cs
示例5: RecordFailure
public void RecordFailure(ContextInfo context, SpecificationInfo specification, Result result)
{
if (!_failures.ContainsKey(context))
{
_failures.Add(context, new List<FailedSpecification>());
}
var entry = _failures[context];
entry.Add(new FailedSpecification {Specification = specification, Result = result});
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:10,代码来源:FailedSpecificationsSummary.cs
示例6: OnContextStart
public void OnContextStart(ContextInfo context)
{
_specifications = 0;
_errors = 0;
_successes = 0;
// TODO: This sucks, but there's no better way unless we make behaviors first-class citizens.
_currentContext = context;
var notify = CreateTaskNotificationFor(context, context);
notify(task => _server.TaskStarting(task));
}
开发者ID:JorritSalverda,项目名称:msbuild-by-convention,代码行数:11,代码来源:PerAssemblyRunListener.cs
示例7: Matches
public override bool Matches(object infoFromRunner, ContextInfo maybeContext)
{
var context = infoFromRunner as ContextInfo;
if (context == null)
{
return false;
}
return ContainingType == context.TypeName;
}
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:11,代码来源:ContextRemoteTaskNotification.cs
示例8: Matches
public override bool Matches(object infoFromRunner, ContextInfo maybeContext)
{
var specification = infoFromRunner as SpecificationInfo;
if (specification == null)
{
return false;
}
return ContainingType == specification.ContainingType &&
FieldName == specification.FieldName;
}
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:12,代码来源:ContextSpecificationRemoteTaskNotification.cs
示例9: AddContextToOrganizedCollectionByConcern
public static void AddContextToOrganizedCollectionByConcern(ContextInfo context, Dictionary<string, List<ContextInfo>> organized)
{
if (context.Concern == null)
{
organized[noContextKey].Add(context);
return;
}
if(!organized.ContainsKey(context.Concern))
organized.Add(context.Concern, new List<ContextInfo>());
organized[context.Concern].Add(context);
}
开发者ID:dtabuenc,项目名称:machine,代码行数:12,代码来源:ReportGenerator.cs
示例10: OnContextStart
public void OnContextStart(ContextInfo context)
{
if (context.Namespace != _currentNamespace)
{
if (!string.IsNullOrEmpty(_currentNamespace))
{
_writer.WriteTestSuiteFinished(_currentNamespace);
}
_currentNamespace = context.Namespace;
_writer.WriteTestSuiteStarted(_currentNamespace);
}
_currentContext = context.FullName;
}
开发者ID:agross,项目名称:machine.specifications,代码行数:13,代码来源:TeamCityReporter.cs
示例11: Before_each_spec
protected override void Before_each_spec()
{
_contextInfo = new ContextInfo("Context", "Concern", "TypeName", "Namespace", "AssemblyName");
PropertyDictionary propertyDictionary = Mocks.Stub<PropertyDictionary>((Project) null);
_task = Mocks.DynamicMock<Task>();
SetupResult.For(_task.Properties).Return(propertyDictionary);
Mocks.Replay(_task);
_sut = new NAntRunListener(_task);
}
开发者ID:stephen-czetty,项目名称:nant-extensions,代码行数:13,代码来源:When_the_NAnt_listener_monitors_context_ends.cs
示例12: OnContextEnd
public void OnContextEnd(ContextInfo context)
{
var result = TaskResult.Inconclusive;
if (_specifications == _successes)
{
result = TaskResult.Success;
}
if (_errors > 0)
{
result = TaskResult.Error;
}
var notify = CreateTaskNotificationFor(context);
notify(task => _server.TaskFinished(task, null, result));
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:15,代码来源:PerAssemblyRunListener.cs
示例13: Matches
public override bool Matches(object infoFromRunner, ContextInfo maybeContext)
{
if (maybeContext == null)
{
return false;
}
var specification = infoFromRunner as SpecificationInfo;
if (specification == null)
{
return false;
}
return ContextTypeName == maybeContext.TypeName &&
ContainingType == new NormalizedTypeName(specification.ContainingType) &&
FieldName == specification.FieldName;
}
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:17,代码来源:BehaviorSpecificationRemoteTaskNotification.cs
示例14: OnContextEnd
public void OnContextEnd(ContextInfo context)
{
_server.TaskProgress(_contextTask, null);
}
开发者ID:bmavity,项目名称:machine.specifications,代码行数:4,代码来源:PerContextRunListener.cs
示例15: CreateTaskNotificationFor
Action<Action<RemoteTask>> CreateTaskNotificationFor(object infoFromRunner, ContextInfo maybeContext)
{
return actionToBePerformedForEachTask =>
{
bool invoked = false;
foreach (var notification in _taskNotifications)
{
if (notification.Matches(infoFromRunner, maybeContext))
{
Debug.WriteLine(String.Format("Invoking notification for {0}", notification.ToString()));
invoked = true;
foreach (var task in notification.RemoteTasks)
{
actionToBePerformedForEachTask(task);
}
}
}
if (!invoked)
{
Debug.WriteLine(String.Format("No matching notification for {0} received by the runner",
infoFromRunner.ToString()));
}
};
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:27,代码来源:PerAssemblyRunListener.cs
示例16: OnContextEnd
public override void OnContextEnd(ContextInfo context)
{
base.OnContextEnd (context);
}
开发者ID:dolittle,项目名称:MSpecRunner,代码行数:4,代码来源:Listener.cs
示例17: OnContextStart
public void OnContextStart(ContextInfo context)
{
_server.TaskProgress(_contextTask, "Running context");
}
开发者ID:bmavity,项目名称:machine.specifications,代码行数:4,代码来源:PerContextRunListener.cs
示例18: OnContextStart
public override void OnContextStart(ContextInfo context)
{
_console.Log.WriteLine (context.FullName);
base.OnContextStart (context);
}
开发者ID:dolittle,项目名称:MSpecRunner,代码行数:5,代码来源:Listener.cs
示例19: OnContextEnd
public void OnContextEnd(ContextInfo context)
{
_currentContext = "";
}
开发者ID:agross,项目名称:machine.specifications,代码行数:4,代码来源:TeamCityReporter.cs
示例20: OnContextStart
public void OnContextStart(ContextInfo context)
{
_listeners.Each(listener => listener.OnContextStart(context));
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:4,代码来源:AggregateRunListener.cs
注:本文中的Machine.Specifications.Runner.ContextInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论