public void VariableParameter() { var action = CallAction.Let <TestActionObject>("v1", null, _ => TestActionObject.Duplicate((new Variable <int>("a")).Value)); action.Should().SaveTo("v1") .And.CallStatic <TestActionObject>("Duplicate") .And.HaveParametersCount(1) .And.HaveVariableParameterN <int>(0, "a"); }
public void CalculateParameterFromConstants() { var action = CallAction.Let <TestActionObject>("v1", null, _ => TestActionObject.Duplicate(10 + 5)); action.Should().SaveTo("v1") .And.CallStatic <TestActionObject>("Duplicate") .And.HaveParametersCount(1) .And.HaveParameterN(0, 15); }
public void CalculateParameterFromExternals() { const int a = 10; const int b = 5; var action = CallAction.Let <TestActionObject>("v1", null, _ => TestActionObject.Duplicate(a + b)); action.Should().SaveTo("v1") .And.CallStatic <TestActionObject>("Duplicate") .And.HaveParametersCount(1) .And.HaveParameterN(0, 15); }