示例#1
0
        protected override async Task Context()
        {
            await base.Context();

            var tableFormula = new OSPSuite.Core.Domain.Formulas.TableFormula();

            _parameter.Formula    = tableFormula;
            _snapshotTableFormula = new TableFormula();
            A.CallTo(() => _tableFormulaMapper.MapToSnapshot(tableFormula)).Returns(_snapshotTableFormula);
        }
示例#2
0
        protected override async Task Context()
        {
            await base.Context();

            _parameterValue    = 1500;
            _parameter.Value   = _parameterValue;
            _snapshotParameter = await sut.MapToSnapshot(_parameter);

            _snapshotParameter.Value        = _parameter.ValueInDisplayUnit;
            _snapshotParameter.TableFormula = new TableFormula();
            var modelTableFormula = new OSPSuite.Core.Domain.Formulas.TableFormula();

            A.CallTo(() => _tableFormulaMapper.MapToModel(_snapshotParameter.TableFormula, A <SnapshotContext> ._)).Returns(modelTableFormula);

            //Set a first value that is not the parameter value
            modelTableFormula.AddPoint(0, 1122);

            //set some dummy value to ensure reset
            _parameter.Value = 12345;
        }