protected virtual void PresentContext(ContextElement element,
                                       IPresentableItem item,
                                       TreeModelNode modelNode,
                                       PresentationState state)
 {
     PresentItem(item, element, state, UnitTestElementImage.TestContainer);
 }
        public static UnitTestElementId CreateId(IUnitTestProvider provider, ContextElement contextElement, string fieldName)
        {
            var result = new[] { contextElement.Id, fieldName };
            var id     = result.Where(s => !string.IsNullOrEmpty(s)).AggregateString(".");

            return(new UnitTestElementId(provider, new PersistentProjectId(contextElement.GetProject()), id));
        }
 public ContextSpecificationElement(MSpecUnitTestProvider provider,
                                    UnitTestElementId id,
                                    ContextElement context,
                                    IClrTypeName declaringTypeName,
                                    UnitTestingCachingService cachingService,
                                    IUnitTestElementManager elementManager,
                                    string fieldName,
                                    bool isIgnored)
     : base(provider,
            context,
            declaringTypeName,
            cachingService,
            elementManager,
            fieldName,
            isIgnored || context.Explicit)
 {
     this._id = id;
 }
 public ContextSpecificationElement(MSpecUnitTestProvider provider,
                                    IPsi psiModuleManager,
                                    ICache cacheManager,
                                    ProjectModelElementEnvoy project,
                                    ContextElement context,
                                    IClrTypeName declaringTypeName,
                                    string fieldName,
                                    bool isIgnored)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            project,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this._id = CreateId(provider, context, fieldName);
 }
 public BehaviorElement(MSpecUnitTestProvider provider,
                        IPsi psiModuleManager,
                        ICache cacheManager,
                        // ReSharper disable SuggestBaseTypeForParameter
                        ContextElement context,
                        // ReSharper restore SuggestBaseTypeForParameter
                        ProjectModelElementEnvoy projectEnvoy,
                        IClrTypeName declaringTypeName,
                        string fieldName,
                        bool isIgnored,
                        string fieldType)
     : base(provider,
            psiModuleManager,
            cacheManager,
            context,
            projectEnvoy,
            declaringTypeName,
            fieldName,
            isIgnored || context.Explicit)
 {
     this.FieldType = fieldType;
     this._id       = CreateId(provider, context, fieldType, fieldName);
 }
        public static UnitTestElementId CreateId(IUnitTestElementIdFactory elementIdFactory, MSpecUnitTestProvider provider, ContextElement contextElement, string fieldType, string fieldName)
        {
            var result = new[] { contextElement.Id, fieldType, fieldName };
            var id     = result.Where(s => !string.IsNullOrEmpty(s)).AggregateString(".");

            return(elementIdFactory.Create(provider, contextElement.GetProject(), id));
        }