Inheritance: IUnitTestElement
コード例 #1
0
    static void PresentItem(IPresentableItem item, Element element, PresentationState state, UnitTestElementImage type)
    {
      item.RichText = element.GetTitle();

      SetTextColor(item, element);
      SetImage(item, state, type);
    }
コード例 #2
0
    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);
    }
コード例 #3
0
    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;
    }
コード例 #4
0
    static void SetTextColor(IPresentableItem item, Element element)
    {
      if (element.IsExplicit)
      {
        item.RichText.SetForeColor(SystemColors.GrayText);
      }

      item.RichText.SetForeColor(SystemColors.GrayText, 0, element.GetTitlePrefix().Length);
    }
コード例 #5
0
 protected FieldElement(MSpecUnitTestProvider provider,
                        Element parent,
                        ProjectModelElementEnvoy projectEnvoy,
                        string declaringTypeName,
                        string fieldName,
                        bool isIgnored)
     : base(provider, parent, projectEnvoy, declaringTypeName, isIgnored || parent.Explicit)
 {
     _fieldName = fieldName;
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 void RemoveChild(Element behaviorElement)
 {
   Children.Remove(behaviorElement);
 }
コード例 #9
0
 void AddChild(Element behaviorElement)
 {
   Children.Add(behaviorElement);
 }