protected ReSharperExtensionAdapterTest()
 {
     _resharperUtil = new Mock <IReSharperUtil>();
     _resharperUtil.SetupGet(x => x.IsInstalled).Returns(true);
     _textDocumentFactoryService = new Mock <ITextDocumentFactoryService>();
     _extensionAdapter           = new ReSharperExtensionAdapter(_resharperUtil.Object, _textDocumentFactoryService.Object);
 }
        public VisualAssistExtensionAdapterTest()
        {
            _visualAssistUtil = new Mock <IVisualAssistUtil>(MockBehavior.Strict);
            _visualAssistUtil.SetupGet(x => x.IsInstalled).Returns(true);

            _adapterRaw = new VisualAssistExtensionAdapter(_visualAssistUtil.Object);
            _adapter    = _adapterRaw;
        }
        public VisualAssistExtensionAdapterTest()
        {
            _visualAssistUtil = new Mock<IVisualAssistUtil>(MockBehavior.Strict);
            _visualAssistUtil.SetupGet(x => x.IsInstalled).Returns(true);

            _adapterRaw = new VisualAssistExtensionAdapter(_visualAssistUtil.Object);
            _adapter = _adapterRaw;
        }
示例#4
0
        /// <summary>
        /// Extracts the extensions in this ExtensibleBase into adapter
        /// </summary>
        protected void FillExtensions(IExtensionAdapter adapter)
        {
            if (adapter == null)
            {
                return;
            }

            adapter.SetAttributeEntensions(AttributeExtensions);
            adapter.SetElementExtensions(ElementExtensions);
        }
示例#5
0
		/// <summary>
		/// Extracts the extensions in this ExtensibleBase into adapter
		/// </summary>
		/// <param name="adapter"></param>
		protected void FillExtensions(IExtensionAdapter adapter)
		{
			if (adapter == null)
			{
				return;
			}

			adapter.SetAttributeEntensions(AttributeExtensions);
			adapter.SetElementExtensions(ElementExtensions);
		}
示例#6
0
	    /// <summary>
		/// Applies the extensions in adapter to ExtensibleBase
		/// </summary>
		/// <param name="adapter"></param>
		public void AddExtensions(IExtensionAdapter adapter)
		{
			if (adapter == null)
			{
				return;
			}

			IEnumerable<XmlAttribute> attributes = adapter.GetAttributeEntensions();
			if (attributes != null)
			{
				AttributeExtensions.AddRange(attributes);
			}

			IEnumerable<XmlElement> elements = adapter.GetElementExtensions();
			if (elements != null)
			{
				ElementExtensions.AddRange(elements);
			}
		}
示例#7
0
        /// <summary>
        /// Applies the extensions in adapter to ExtensibleBase
        /// </summary>
        public void AddExtensions(IExtensionAdapter adapter)
        {
            if (adapter == null)
            {
                return;
            }

            IEnumerable <XmlAttribute> attributes = adapter.GetAttributeEntensions();

            if (attributes != null)
            {
                AttributeExtensions.AddRange(attributes);
            }

            IEnumerable <XmlElement> elements = adapter.GetElementExtensions();

            if (elements != null)
            {
                ElementExtensions.AddRange(elements);
            }
        }
示例#8
0
 protected PowerShellToolsExtensionAdapterTest()
 {
     _powerShellToolsUtil = new Mock <IPowerShellToolsUtil>();
     _powerShellToolsUtil.SetupGet(x => x.IsInstalled).Returns(true);
     _extensionAdapter = new PowerShellToolsExtensionAdapter(_powerShellToolsUtil.Object);
 }