static void PresentItem(IPresentableItem item, Element element, PresentationState state, UnitTestElementImage type) { item.RichText = element.GetTitle(); SetTextColor(item, element); SetImage(item, state, type); }
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); }
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; }
static void SetTextColor(IPresentableItem item, Element element) { if (element.IsExplicit) { item.RichText.SetForeColor(SystemColors.GrayText); } item.RichText.SetForeColor(SystemColors.GrayText, 0, element.GetTitlePrefix().Length); }
protected FieldElement(MSpecUnitTestProvider provider, Element parent, ProjectModelElementEnvoy projectEnvoy, string declaringTypeName, string fieldName, bool isIgnored) : base(provider, parent, projectEnvoy, declaringTypeName, isIgnored || parent.Explicit) { _fieldName = fieldName; }
protected FieldElement(MSpecUnitTestProvider provider, IPsi psiModuleManager, ICache cacheManager, Element parent, ProjectModelElementEnvoy projectEnvoy, IClrTypeName declaringTypeName, string fieldName, bool isIgnored) : base(provider, psiModuleManager, cacheManager, parent, projectEnvoy, declaringTypeName, isIgnored || parent.Explicit) { _fieldName = fieldName; }
protected FieldElement(MSpecUnitTestProvider provider, PsiModuleManager psiModuleManager, CacheManager cacheManager, Element parent, ProjectModelElementEnvoy projectEnvoy, string declaringTypeName, string fieldName, bool isIgnored) : base(provider, psiModuleManager, cacheManager, parent, projectEnvoy, declaringTypeName, isIgnored || parent.Explicit) { _fieldName = fieldName; State = UnitTestElementState.Valid; }
void RemoveChild(Element behaviorElement) { Children.Remove(behaviorElement); }
void AddChild(Element behaviorElement) { Children.Add(behaviorElement); }