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() { _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 ParameterConverter(IDimensionMapper dimensionMapper, IUsingFormulaConverter usingFormulaConverter) { _dimensionMapper = dimensionMapper; _usingFormulaConverter = usingFormulaConverter; }