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; }
/// <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); }
/// <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); }
/// <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); } }
/// <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); } }
protected PowerShellToolsExtensionAdapterTest() { _powerShellToolsUtil = new Mock <IPowerShellToolsUtil>(); _powerShellToolsUtil.SetupGet(x => x.IsInstalled).Returns(true); _extensionAdapter = new PowerShellToolsExtensionAdapter(_powerShellToolsUtil.Object); }