Exemple #1
0
        protected override void Given()
        {
            _variable = new Variable("Grasp", "Test", typeof(int));

            _schema = new GraspSchema(new[] { _variable }, Enumerable.Empty<Calculation>());

            _initialState = A.Fake<IRuntimeSnapshot>();

            _initialValue = 1;

            A.CallTo(() => _initialState.GetValue(_variable)).Returns(_initialValue);

            _executable = new GraspExecutable(_schema, A.Fake<ICalculator>());
        }
Exemple #2
0
 private IEnumerable<VariableBinding> GetBindings(IRuntimeSnapshot initialState)
 {
     return Schema.Variables.Select(variable => new VariableBinding(variable, initialState.GetValue(variable)));
 }