public DimensionConverter(IDimensionMapper dimensionMapper, IParameterConverter parameterConverter, IUsingFormulaConverter usingFormulaConverter, IDataRepositoryConverter dataRepositoryConverter) { _dimensionMapper = dimensionMapper; _parameterConverter = parameterConverter; _usingFormulaConverter = usingFormulaConverter; _dataRepositoryConverter = dataRepositoryConverter; }
protected override void Context() { _dimensionMapper = A.Fake <IDimensionMapper>(); _dimension = A.Fake <IDimension>(); _usingFormulaConverter = A.Fake <IUsingFormulaConverter>(); _parameter = new Parameter().WithDimension(_dimension); sut = new ParameterConverter(_dimensionMapper, _usingFormulaConverter); A.CallTo(() => _dimensionMapper.ConversionFactor(_parameter)).Returns(_conversionFactor); }
protected override void Context() { _dimensionConverter = A.Fake <IDimensionConverter>(); _dimensionFactory = A.Fake <IMoBiDimensionFactory>(); _objectBaseFactory = A.Fake <IObjectBaseFactory>(); _formulaMapper = A.Fake <IFormulaMapper>(); _dimensionMapper = A.Fake <IDimensionMapper>(); _eventPublisher = A.Fake <IEventPublisher>(); sut = new Converter313To32(_dimensionConverter, _dimensionFactory, _objectBaseFactory, _formulaMapper, _dimensionMapper, _eventPublisher); }
public Converter313To32(IDimensionConverter dimensionConverter, IMoBiDimensionFactory dimensionFactory, IObjectBaseFactory objectBaseFactory, IFormulaMapper formulaMapper, IDimensionMapper dimensionMapper, IEventPublisher eventPublisher) { _dimensionConverter = dimensionConverter; _dimensionFactory = dimensionFactory; _objectBaseFactory = objectBaseFactory; _formulaMapper = formulaMapper; _dimensionMapper = dimensionMapper; _eventPublisher = eventPublisher; _objectTypeResolver = new ObjectTypeResolver(); _suspendWarning = false; }
public ParameterValuesCacheConverter(IContainerTask containerTask, IEntityPathResolver entityPathResolver, IParameterQuery parameterQuery, IParameterFactory parameterFactory, IGenderRepository genderRepository, IContainer container, IDimensionMapper dimensionMapper) { _containerTask = containerTask; _entityPathResolver = entityPathResolver; _parameterQuery = parameterQuery; _parameterFactory = parameterFactory; _genderRepository = genderRepository; _container = container; _dimensionMapper = dimensionMapper; }
protected override void Context() { _parameterFactory = A.Fake <IParameterFactory>(); _containerTask = A.Fake <IContainerTask>(); _entityPathResolver = A.Fake <IEntityPathResolver>(); _parameterQuery = A.Fake <IParameterQuery>(); _genderRepository = A.Fake <IGenderRepository>(); _container = A.Fake <IContainer>(); _dimensionMapper = A.Fake <IDimensionMapper>(); sut = new ParameterValuesCacheConverter(_containerTask, _entityPathResolver, _parameterQuery, _parameterFactory, _genderRepository, _container, _dimensionMapper); }
protected override void Context() { _formulaMapper = A.Fake <IFormulaMapper>(); _dimensionMapper = A.Fake <IDimensionMapper>(); _usingDimensionConverter = A.Fake <IUsingDimensionConverter>(); var dimension = A.Fake <IDimension>(); _explicitFormula = new ExplicitFormula("A+B").WithDimension(dimension); A.CallTo(() => _formulaMapper.NewFormulaFor(_explicitFormula.FormulaString)).Returns(string.Empty); A.CallTo(() => _dimensionMapper.ConversionFactor(_formula)).Returns(1); _formula = _explicitFormula; sut = new UsingFormulaConverter(_dimensionMapper, _formulaMapper, _usingDimensionConverter); }
protected override void Context() { _element = new XElement("Root", new XElement("Container1", new XElement("Parameter1", new XAttribute(Constants.Serialization.Attribute.Dimension, "OldDim1")), new XElement("Parameter2", new XAttribute(Constants.Serialization.Attribute.Dimension, "Dim1"))), new XElement("Container2", new XElement("Parameter3", new XAttribute(Constants.Serialization.Attribute.Dimension, "OldDim2")), new XElement("Parameter4", new XAttribute(Constants.Serialization.Attribute.Dimension, "Dim2")))); _dimensionMapper = A.Fake <IDimensionMapper>(); _parameterConverter = A.Fake <IParameterConverter>(); _usingFormulaConverter = A.Fake <IUsingFormulaConverter>(); _dataRepositoryConverter = A.Fake <IDataRepositoryConverter>(); A.CallTo(() => _dimensionMapper.DimensionNameFor("OldDim1", false)).Returns("NewDim1"); A.CallTo(() => _dimensionMapper.DimensionNameFor("Dim1", false)).Returns("Dim1"); A.CallTo(() => _dimensionMapper.DimensionNameFor("OldDim2", false)).Returns("NewDim2"); A.CallTo(() => _dimensionMapper.DimensionNameFor("Dim2", false)).Returns("Dim2"); sut = new DimensionConverter(_dimensionMapper, _parameterConverter, _usingFormulaConverter, _dataRepositoryConverter); }
public FormulaAndDimensionConverter(IDimensionConverter dimensionConverter, IDimensionMapper dimensionMapper) { _dimensionConverter = dimensionConverter; _dimensionMapper = dimensionMapper; }
public DataRepositoryConverter(IUsingDimensionConverter usingDimensionConverter, IDimensionMapper dimensionMapper) { _usingDimensionConverter = usingDimensionConverter; _dimensionMapper = dimensionMapper; }
public UsingFormulaConverter(IDimensionMapper dimensionMapper, IFormulaMapper formulaMapper, IUsingDimensionConverter usingDimensionConverter) { _dimensionMapper = dimensionMapper; _formulaMapper = formulaMapper; _usingDimensionConverter = usingDimensionConverter; }
public ParameterConverter(IDimensionMapper dimensionMapper, IUsingFormulaConverter usingFormulaConverter) { _dimensionMapper = dimensionMapper; _usingFormulaConverter = usingFormulaConverter; }
protected override void Context() { _usingDimensionConverter = A.Fake <IUsingDimensionConverter>(); _dimensionMapper = A.Fake <IDimensionMapper>(); sut = new DataRepositoryConverter(_usingDimensionConverter, _dimensionMapper); }
public SerializationDimensionFactory(IDimensionFactory dimensionFactory, IDimensionMapper dimensionMapper) { _dimensionFactory = dimensionFactory; _allDimensions = new Cache <string, IDimension>(x => x.Name); _allDimensions.AddRange(dimensionMapper.DummyDimensionsForConversion); }