本文整理汇总了C#中MSpecUnitTestProvider类的典型用法代码示例。如果您正苦于以下问题:C# MSpecUnitTestProvider类的具体用法?C# MSpecUnitTestProvider怎么用?C# MSpecUnitTestProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MSpecUnitTestProvider类属于命名空间,在下文中一共展示了MSpecUnitTestProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetOrCreateContextElement
public static ContextElement GetOrCreateContextElement(MSpecUnitTestProvider provider,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
string typeName,
string assemblyLocation,
string subject,
ICollection<string> tags,
bool isIgnored)
{
#if RESHARPER_6
var id = ContextElement.CreateId(subject, typeName);
var contextElement = provider.UnitTestManager.GetElementById(project, id) as ContextElement;
if (contextElement != null)
{
contextElement.State = UnitTestElementState.Valid;
return contextElement;
}
#endif
return new ContextElement(provider,
projectEnvoy,
typeName,
assemblyLocation,
subject,
tags,
isIgnored);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:27,代码来源:ContextFactory.cs
示例2: GetOrCreateContextSpecification
public static ContextSpecificationElement GetOrCreateContextSpecification(MSpecUnitTestProvider provider,
IUnitTestElementManager manager,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
IProject project,
ContextElement context,
ProjectModelElementEnvoy projectEnvoy,
IClrTypeName declaringTypeName,
string fieldName,
bool isIgnored)
{
var id = ContextSpecificationElement.CreateId(context, fieldName);
var contextSpecification = manager.GetElementById(project, id) as ContextSpecificationElement;
if (contextSpecification != null)
{
contextSpecification.Parent = context;
contextSpecification.State = UnitTestElementState.Valid;
return contextSpecification;
}
return new ContextSpecificationElement(provider,
psiModuleManager,
cacheManager,
context,
projectEnvoy,
declaringTypeName,
fieldName,
isIgnored);
}
开发者ID:AnthonyMastrean,项目名称:machine.specifications,代码行数:29,代码来源:ContextSpecificationFactory.cs
示例3: GetOrCreateBehaviorSpecification
public static BehaviorSpecificationElement GetOrCreateBehaviorSpecification(MSpecUnitTestProvider provider,
IUnitTestElementManager manager,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
IProject project,
BehaviorElement behavior,
ProjectModelElementEnvoy projectEnvoy,
IClrTypeName declaringTypeName,
string fieldName,
bool isIgnored)
{
var id = BehaviorSpecificationElement.CreateId(behavior, fieldName);
var behaviorSpecification = manager.GetElementById(project, id) as BehaviorSpecificationElement;
if (behaviorSpecification != null)
{
behaviorSpecification.Parent = behavior;
behaviorSpecification.State = UnitTestElementState.Valid;
return behaviorSpecification;
}
return new BehaviorSpecificationElement(provider,
psiModuleManager,
cacheManager,
behavior,
projectEnvoy,
declaringTypeName,
fieldName,
isIgnored);
}
开发者ID:kasson,项目名称:machine.specifications,代码行数:29,代码来源:BehaviorSpecificationFactory.cs
示例4: FileExplorer
public FileExplorer(MSpecUnitTestProvider provider,
ElementFactories factories,
IFile file,
UnitTestElementLocationConsumer consumer,
Func<bool> interrupted)
{
if (file == null)
{
throw new ArgumentNullException("file");
}
if (provider == null)
{
throw new ArgumentNullException("provider");
}
_consumer = consumer;
_file = file;
_interrupted = interrupted;
var project = file.GetSourceFile().ToProjectFile().GetProject();
#if !RESHARPER_8
_assemblyPath = UnitTestManager.GetOutputAssemblyPath(project).FullPath;
#else
_assemblyPath = project.GetOutputFilePath().FullPath;
#endif
_elementHandlers = new List<IElementHandler>
{
new ContextElementHandler(factories),
new ContextSpecificationElementHandler(factories),
new BehaviorElementHandler(factories)
};
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:35,代码来源:FileExplorer.cs
示例5: ReadFromXml
public static IUnitTestElement ReadFromXml(XmlElement parent, IUnitTestElement parentElement, MSpecUnitTestProvider provider, ISolution solution
#if RESHARPER_61
, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager
#endif
)
{
var projectId = parent.GetAttribute("projectId");
var project = ProjectUtil.FindProjectElementByPersistentID(solution, projectId) as IProject;
if (project == null)
{
return null;
}
var behavior = parentElement as BehaviorElement;
if (behavior == null)
{
return null;
}
var typeName = parent.GetAttribute("typeName");
var methodName = parent.GetAttribute("methodName");
var isIgnored = bool.Parse(parent.GetAttribute("isIgnored"));
return BehaviorSpecificationFactory.GetOrCreateBehaviorSpecification(provider,
#if RESHARPER_61
manager, psiModuleManager, cacheManager,
#endif
project, behavior, ProjectModelElementEnvoy.Create(project), typeName, methodName, isIgnored);
}
开发者ID:rho24,项目名称:machine.specifications,代码行数:29,代码来源:BehaviorSpecificationElement.cs
示例6: GetOrCreateBehavior
public static BehaviorElement GetOrCreateBehavior(MSpecUnitTestProvider provider,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
ContextElement context,
string declaringTypeName,
string fieldName,
bool isIgnored,
string fullyQualifiedTypeName)
{
#if RESHARPER_6
var id = BehaviorElement.CreateId(context, fieldName);
var behavior = provider.UnitTestManager.GetElementById(project, id) as BehaviorElement;
if (behavior != null)
{
behavior.Parent = context;
behavior.State = UnitTestElementState.Valid;
return behavior;
}
#endif
return new BehaviorElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
isIgnored,
fullyQualifiedTypeName);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:28,代码来源:BehaviorFactory.cs
示例7: ReadFromXml
public static IUnitTestElement ReadFromXml(XmlElement parent, IUnitTestElement parentElement, MSpecUnitTestProvider provider)
{
var projectId = parent.GetAttribute("projectId");
var project = ProjectUtil.FindProjectElementByPersistentID(provider.Solution, projectId) as IProject;
if (project == null)
{
return null;
}
var context = parentElement as ContextElement;
if (context == null)
{
return null;
}
var typeName = parent.GetAttribute("typeName");
var methodName = parent.GetAttribute("methodName");
var isIgnored = bool.Parse(parent.GetAttribute("isIgnored"));
var fullyQualifiedTypeName = parent.GetAttribute("typeFQN");
return Factories.BehaviorFactory.GetOrCreateBehavior(provider,
project,
ProjectModelElementEnvoy.Create(project),
context,
typeName,
methodName,
isIgnored,
fullyQualifiedTypeName);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:29,代码来源:BehaviorElement.cs
示例8: GetOrCreateContextSpecification
public static ContextSpecificationElement GetOrCreateContextSpecification(MSpecUnitTestProvider provider,
IProject project,
ContextElement context,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
string fieldName,
ICollection<string> tags,
bool isIgnored)
{
#if RESHARPER_6
var id = ContextSpecificationElement.CreateId(context, fieldName);
var contextSpecification = provider.UnitTestManager.GetElementById(project, id) as ContextSpecificationElement;
if (contextSpecification != null)
{
contextSpecification.Parent = context;
contextSpecification.State = UnitTestElementState.Valid;
return contextSpecification;
}
#endif
return new ContextSpecificationElement(provider,
context,
projectEnvoy,
declaringTypeName,
fieldName,
tags,
isIgnored);
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:28,代码来源:ContextSpecificationFactory.cs
示例9: AssemblyExplorer
public AssemblyExplorer(MSpecUnitTestProvider provider,
#if RESHARPER_61
IUnitTestElementManager manager,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
#endif
IMetadataAssembly assembly,
IProject project,
UnitTestElementConsumer consumer)
{
_assembly = assembly;
_consumer = consumer;
using (ReadLockCookie.Create())
{
var projectEnvoy = new ProjectModelElementEnvoy(project);
var cache = new ContextCache();
#if RESHARPER_61
_contextFactory = new ContextFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, _assembly.Location.FullPath, cache);
_contextSpecificationFactory = new ContextSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
_behaviorFactory = new BehaviorFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy, cache);
_behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, manager, psiModuleManager, cacheManager, project, projectEnvoy);
#else
#if RESHARPER_6
_contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location.FullPath, cache);
#else
_contextFactory = new ContextFactory(provider, project, projectEnvoy, _assembly.Location, cache);
#endif
_contextSpecificationFactory = new ContextSpecificationFactory(provider, project, projectEnvoy, cache);
_behaviorFactory = new BehaviorFactory(provider, project, projectEnvoy, cache);
_behaviorSpecificationFactory = new BehaviorSpecificationFactory(provider, project, projectEnvoy);
#endif
}
}
开发者ID:jleo3,项目名称:machine.specifications,代码行数:35,代码来源:AssemblyExplorer.cs
示例10: BehaviorSpecificationFactory
public BehaviorSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy)
{
#endif
_provider = provider;
_project = project;
_projectEnvoy = projectEnvoy;
}
开发者ID:hereyes,项目名称:machine.specifications,代码行数:7,代码来源:BehaviorSpecificationFactory.cs
示例11: GetOrCreateContext
public static ContextElement GetOrCreateContext(MSpecUnitTestProvider provider,
IUnitTestElementManager manager,
PsiModuleManager psiModuleManager,
CacheManager cacheManager,
IProject project,
ProjectModelElementEnvoy projectEnvoy,
IClrTypeName typeName,
string assemblyLocation,
string subject,
ICollection<string> tags,
bool isIgnored)
{
var id = ContextElement.CreateId(subject, typeName.FullName, tags);
var contextElement = manager.GetElementById(project, id) as ContextElement;
if (contextElement != null)
{
contextElement.State = UnitTestElementState.Valid;
return contextElement;
}
return new ContextElement(provider,
psiModuleManager,
cacheManager,
projectEnvoy,
typeName,
assemblyLocation,
subject,
tags,
isIgnored);
}
开发者ID:ptomasroos,项目名称:machine.specifications,代码行数:30,代码来源:ContextFactory.cs
示例12: ContextFactory
public ContextFactory(MSpecUnitTestProvider provider, ProjectModelElementEnvoy projectEnvoy, string assemblyPath, ContextCache cache)
{
_provider = provider;
_cache = cache;
_projectEnvoy = projectEnvoy;
_assemblyPath = assemblyPath;
}
开发者ID:hhariri,项目名称:machine.specifications,代码行数:7,代码来源:ContextFactory.cs
示例13: BehaviorFactory
public BehaviorFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
{
_provider = provider;
_cache = cache;
_project = project;
_projectEnvoy = projectEnvoy;
}
开发者ID:ChrisEdwards,项目名称:machine.specifications,代码行数:7,代码来源:BehaviorFactory.cs
示例14: ReadFromXml
public static IUnitTestElement ReadFromXml(XmlElement parent, IUnitTestElement parentElement, MSpecUnitTestProvider provider, ISolution solution
#if RESHARPER_61
, IUnitTestElementManager manager, PsiModuleManager psiModuleManager, CacheManager cacheManager
#endif
)
{
var projectId = parent.GetAttribute("projectId");
var project = ProjectUtil.FindProjectElementByPersistentID(solution, projectId) as IProject;
if (project == null)
{
return null;
}
var context = parentElement as ContextElement;
if (context == null)
{
return null;
}
var typeName = parent.GetAttribute("typeName");
var methodName = parent.GetAttribute("methodName");
var isIgnored = bool.Parse(parent.GetAttribute("isIgnored"));
return ContextSpecificationFactory.GetOrCreateContextSpecification(provider,
#if RESHARPER_61
manager, psiModuleManager, cacheManager,
#endif
project, context, ProjectModelElementEnvoy.Create(project), new ClrTypeName(typeName), methodName, EmptyArray<string>.Instance, isIgnored);
}
开发者ID:kropp,项目名称:machine.specifications,代码行数:29,代码来源:ContextSpecificationElement.cs
示例15: FileExplorer
public FileExplorer(MSpecUnitTestProvider provider,
ElementFactories factories,
IFile file,
IUnitTestElementsObserver consumer,
Func<bool> interrupted)
{
if (file == null)
{
throw new ArgumentNullException("file");
}
if (provider == null)
{
throw new ArgumentNullException("provider");
}
this._consumer = consumer;
this._file = file;
this._interrupted = interrupted;
var project = file.GetSourceFile().ToProjectFile().GetProject();
this._assemblyPath = project.GetOutputFilePath().FullPath;
this._elementHandlers = new List<IElementHandler>
{
new ContextElementHandler(factories),
new ContextSpecificationElementHandler(factories),
new BehaviorElementHandler(factories)
};
}
开发者ID:JAllman,项目名称:machine.specifications.runner.resharper,代码行数:31,代码来源:FileExplorer.cs
示例16: Element
protected Element(MSpecUnitTestProvider provider,
IPsi psiModuleManager,
ICache cacheManager,
Element parent,
ProjectModelElementEnvoy projectEnvoy,
IClrTypeName declaringTypeName,
bool isIgnored)
{
if (declaringTypeName == null)
{
throw new ArgumentNullException("declaringTypeName");
}
if (projectEnvoy != null)
{
_projectEnvoy = projectEnvoy;
}
_provider = provider;
_declaringTypeName = declaringTypeName;
_psiModuleManager = psiModuleManager;
_cacheManager = cacheManager;
if (isIgnored)
{
ExplicitReason = "Ignored";
}
TypeName = declaringTypeName;
Parent = parent;
Children = new List<IUnitTestElement>();
State = UnitTestElementState.Valid;
_taskFactory = new UnitTestTaskFactory(_provider.ID);
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:35,代码来源:Element.cs
示例17: Element
protected Element(MSpecUnitTestProvider provider,
Element parent,
ProjectModelElementEnvoy projectEnvoy,
string declaringTypeName,
bool isIgnored)
{
if (projectEnvoy == null && !Shell.Instance.IsTestShell)
{
throw new ArgumentNullException("project");
}
if (declaringTypeName == null)
{
throw new ArgumentNullException("declaringTypeName");
}
if (projectEnvoy != null)
{
_projectEnvoy = projectEnvoy;
}
_provider = provider;
_declaringTypeName = declaringTypeName;
if (isIgnored)
{
ExplicitReason = "Ignored";
}
TypeName = declaringTypeName;
Parent = parent;
Children = new List<IUnitTestElement>();
State = UnitTestElementState.Valid;
}
开发者ID:chrisnicola,项目名称:machine.specifications,代码行数:35,代码来源:Element.cs
示例18: ContextSpecificationFactory
public ContextSpecificationFactory(MSpecUnitTestProvider provider, IProject project, ProjectModelElementEnvoy projectEnvoy, ContextCache cache)
{
#endif
_provider = provider;
_cache = cache;
_project = project;
_projectEnvoy = projectEnvoy;
}
开发者ID:kropp,项目名称:machine.specifications,代码行数:8,代码来源:ContextSpecificationFactory.cs
示例19: MSpecTestElementsSource
public MSpecTestElementsSource(MSpecUnitTestProvider provider, AssemblyExplorer assemblyExplorer, ElementFactories elementFactories, IShellLocks shellLocks)
{
this._provider = provider;
this._assemblyExplorer = assemblyExplorer;
this._elementFactories = elementFactories;
_metadataElementsSource = new MetadataElementsSource(Logger.GetLogger(typeof(MSpecTestElementsSource)),
shellLocks);
}
开发者ID:JAllman,项目名称:machine.specifications.runner.resharper,代码行数:9,代码来源:MSpecTestElementsSource.cs
示例20: BehaviorSpecificationFactory
public BehaviorSpecificationFactory(MSpecUnitTestProvider provider,
IUnitTestElementManager manager,
IPsi psiModuleManager,
ICache cacheManager)
{
_manager = manager;
_psiModuleManager = psiModuleManager;
_cacheManager = cacheManager;
_provider = provider;
}
开发者ID:hennys,项目名称:machine.specifications,代码行数:10,代码来源:BehaviorSpecificationFactory.cs
注:本文中的MSpecUnitTestProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论