public void GetPropertyInfoProp() { // Regression test for (internal). Use a decorated factory since // propertyInfo.pProperty should be the decorated object. var decoratorUtil = new DecoratorUtil( new ProxyGenerationOptions(new DebugEngineProxyHook())); // Needs at least one aspect or else decorator is not assigned to Self. IDecorator factoryDecorator = decoratorUtil.CreateFactoryDecorator( new ProxyGenerator(), new NoopAspect()); DebugAsyncProperty.Factory decoratedPropertyFactory = factoryDecorator.Decorate(propertyFactory); IGgpAsyncDebugProperty decoratedDebugProperty = decoratedPropertyFactory.Create(mockVarInfo); DEBUG_PROPERTY_INFO propertyInfo; decoratedDebugProperty.GetPropertyInfo(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP, out propertyInfo); Assert.That( propertyInfo.dwFields.HasFlag(enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_PROP)); Assert.That(propertyInfo.pProperty, Is.SameAs(decoratedDebugProperty)); }
public void SetUp() { mockVarInfo = Substitute.For <IVariableInformation>(); mockVarInfo.GetCachedView().Returns(mockVarInfo); var taskExecutor = new TaskExecutor(new JoinableTaskContext().Factory); var enumFactory = new VariableInformationEnum.Factory(taskExecutor); var childrenProviderFactory = new ChildrenProvider.Factory(); propertyFactory = new DebugAsyncProperty.Factory(enumFactory, childrenProviderFactory, null, new VsExpressionCreator(), taskExecutor); createPropertyDelegate = propertyFactory.Create; childrenProviderFactory.Initialize(createPropertyDelegate); debugProperty = propertyFactory.Create(mockVarInfo); logSpy = new LogSpy(); logSpy.Attach(); }