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>()); }
private IEnumerable<VariableBinding> GetBindings(IRuntimeSnapshot initialState) { return Schema.Variables.Select(variable => new VariableBinding(variable, initialState.GetValue(variable))); }