public void TestCopyVariables() { List <DEVariable> expectedResult = new List <DEVariable> { new DEVariable(leftDEVariables[0].Name, leftDEVariables[0].Value), new DEVariable(leftDEVariables[1].Name, leftDEVariables[1].Value) }; List <DEVariable> actualResult = new List <DEVariable>(); DifferentialEquationSystemHelpers.CopyVariables(leftDEVariables, actualResult); VerifyCollections(expectedResult, actualResult); List <Variable> secondActualResult = new List <Variable>(); DifferentialEquationSystemHelpers.CopyVariables(leftDEVariables, secondActualResult); VerifyCollections(expectedResult, secondActualResult); List <DEVariable> thirdActualResult = new List <DEVariable>(); DifferentialEquationSystemHelpers.CopyVariables(leftDEVariables, thirdActualResult); VerifyCollections(leftDEVariables, thirdActualResult); List <Variable> forthActualResult = new List <Variable>(); DifferentialEquationSystemHelpers.CopyVariables(leftDEVariables, forthActualResult); VerifyCollections(leftDEVariables, forthActualResult); }
public void TestCheckVariablesExpressionNotEqualVariables() { List <Variable> vars = new List <Variable>(); DifferentialEquationSystemHelpers.CopyVariables(differentialEquationSystem.LeftVariables, vars); vars.Add(new Variable("x1", 8)); DifferentialEquationSystemHelpers.CheckVariables( differentialEquationSystem.ExpressionSystem, vars, differentialEquationSystem.TimeVariable, differentialEquationSystem.Tau, differentialEquationSystem.TEnd); }