Force crack calculator was fixed

This commit is contained in:
RedikultsevEvg
2024-08-04 23:01:10 +05:00
parent e7c7211f54
commit 3eb5aa2b96
54 changed files with 1031 additions and 300 deletions

View File

@@ -7,15 +7,14 @@ namespace StructureHelperTests.UnitTests.Calcuators
{
[TestCase(0d, 1d, 0.5d, 0.5d)]
[TestCase(0d, 10d, 5d, 5d)]
public void Run_ShouldPass_Valid(double startValue, double EndValue, double predicateValue, double expectedValue)
public void Run_ShouldPass_Valid(double startValue, double endValue, double predicateValue, double expectedValue)
{
//Arrange
var calculator = new FindParameterCalculator()
{
StartValue = startValue,
EndValue = EndValue,
Predicate = x => x > predicateValue
};
var calculator = new FindParameterCalculator();
calculator.InputData.StartValue = startValue;
calculator.InputData.EndValue = endValue; ;
calculator.InputData.Predicate = x => x > predicateValue;
//Act
calculator.Run();
var result = calculator.Result as FindParameterResult;
@@ -26,15 +25,13 @@ namespace StructureHelperTests.UnitTests.Calcuators
}
[TestCase(0d, 1d, 5d, 5d, false)]
[TestCase(0d, 10d, 15d, 15d, false)]
public void Run_ShouldPass_NotValid(double startValue, double EndValue, double predicateValue, double expectedValue, bool isValid)
public void Run_ShouldPass_NotValid(double startValue, double endValue, double predicateValue, double expectedValue, bool isValid)
{
//Arrange
var calculator = new FindParameterCalculator()
{
StartValue = startValue,
EndValue = EndValue,
Predicate = x => x > predicateValue
};
var calculator = new FindParameterCalculator();
calculator.InputData.StartValue = startValue;
calculator.InputData.EndValue = endValue; ;
calculator.InputData.Predicate = x => x > predicateValue;
//Act
calculator.Run();
var result = calculator.Result as FindParameterResult;