Beispiel #1
0
        private IEnumerable <IExpression> MapVariableArguments()
        {
            var args            = _elementFinder.FindArgumentsWithVariableType();
            var mappingStrategy = new AccessedVariableStrategy();

            return(args.Select(arg => new VariableMapperBridge(arg, _parent, mappingStrategy).GetMappedItem()));
        }
        private IEnumerable <IExpression> MapVariablesInRightPart()
        {
            var variables       = _elementFinder.FindVariablesInRightPart();
            var mappingStrategy = new AccessedVariableStrategy();

            return(variables.Select(variable =>
                                    new VariableMapperBridge(variable, _parent, mappingStrategy).GetMappedItem()));
        }
        public void AccessedMember_WithAccessedStrategy_ShouldMapAs_ModifiedVariable()
        {
            var accessedStrategy = new AccessedVariableStrategy();
            var mapper           = new VariableMapperBridge(new FakeIdentifierElementFinder(new[] { _declaredFieldId }),
                                                            _methodReferenceResolver, accessedStrategy);

            var mappedVariable = mapper.GetMappedItem();

            Assert.IsInstanceOfType(mappedVariable, typeof(VariableAccess));
        }