Exemplo n.º 1
0
        protected override void Given()
        {
            _outputVariable1 = new Variable("Grasp", "Test1", typeof(int));
            _outputVariable2 = new Variable("Grasp", "Test2", typeof(int));

            _value1 = 1;
            _value2 = 2;

            _function1 = runtime => _value1;
            _function2 = runtime => _value2;

            _calculator1 = new FunctionCalculator(_outputVariable1, _function1);
            _calculator2 = new FunctionCalculator(_outputVariable2, _function2);

            _compositeCalculator = new CompositeCalculator(_calculator1, _calculator2);

            var schema = new GraspSchema(Enumerable.Empty<Variable>(), Enumerable.Empty<Calculation>());

            _runtime = new GraspRuntime(schema, _compositeCalculator, Enumerable.Empty<VariableBinding>());
        }
Exemplo n.º 2
0
 protected override void When()
 {
     _calculator = new CompositeCalculator(_calculators);
 }