Add calculators saving

This commit is contained in:
Evgeny Redikultsev
2024-10-19 20:32:25 +05:00
parent d16c0e1f79
commit d3a1992f4d
131 changed files with 1742 additions and 375 deletions

View File

@@ -56,7 +56,7 @@ public class CheckTupleCalculatorInputDataTests
// Arrange
_checkTupleCalculatorInputData.InputData = new TupleCrackInputData
{
Primitives = new List<INdmPrimitive> { new EllipsePrimitive() }, // Assuming at least one valid primitive
Primitives = new List<INdmPrimitive> { new EllipseNdmPrimitive() }, // Assuming at least one valid primitive
UserCrackInputData = null
};
@@ -74,7 +74,7 @@ public class CheckTupleCalculatorInputDataTests
// Arrange
_checkTupleCalculatorInputData.InputData = new TupleCrackInputData
{
Primitives = new List<INdmPrimitive> { new EllipsePrimitive() }, // Assuming at least one valid primitive
Primitives = new List<INdmPrimitive> { new EllipseNdmPrimitive() }, // Assuming at least one valid primitive
UserCrackInputData = new UserCrackInputData() // Assuming this is valid
};

View File

@@ -14,7 +14,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
{
// Arrange
var mockInputFactory = new Mock<IRebarCrackInputDataFactory>();
var rebar = new RebarPrimitive();
var rebar = new RebarNdmPrimitive();
var inputData = new TupleCrackInputData();
var rebarCrackInputData = new RebarCrackCalculatorInputData();
@@ -26,7 +26,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
var factory = new RebarCalulatorsFactory(mockInputFactory.Object)
{
Rebars = new List<RebarPrimitive> { rebar },
Rebars = new List<RebarNdmPrimitive> { rebar },
InputData = inputData,
LongLength = 10.0,
ShortLength = 5.0,
@@ -48,8 +48,8 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
{
// Arrange
var mockInputFactory = new Mock<IRebarCrackInputDataFactory>();
var rebar1 = new RebarPrimitive();
var rebar2 = new RebarPrimitive();
var rebar1 = new RebarNdmPrimitive();
var rebar2 = new RebarNdmPrimitive();
var inputData = new TupleCrackInputData();
var rebarInputData1 = new RebarCrackCalculatorInputData();
var rebarInputData2 = new RebarCrackCalculatorInputData();
@@ -64,7 +64,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
var factory = new RebarCalulatorsFactory(mockInputFactory.Object)
{
Rebars = new List<RebarPrimitive> { rebar1, rebar2 },
Rebars = new List<RebarNdmPrimitive> { rebar1, rebar2 },
InputData = inputData,
LongLength = 20.0,
ShortLength = 10.0,

View File

@@ -37,7 +37,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
_mockRebarStressCalculator.Setup(x => x.Run());
_mockRebarStressCalculator.Setup(x => x.Result).Returns(mockRebarStressResult);
var mockRebarPrimitive = new Mock<IRebarPrimitive>();
var mockRebarPrimitive = new Mock<IRebarNdmPrimitive>();
var mockRebarCrackInputData = new Mock<IRebarCrackInputData>();
_rebarStressResultLogic.RebarPrimitive = mockRebarPrimitive.Object;
@@ -64,7 +64,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
_mockRebarStressCalculator.Setup(x => x.Run());
_mockRebarStressCalculator.Setup(x => x.Result).Returns(mockRebarStressResult);
var mockRebarPrimitive = new Mock<IRebarPrimitive>();
var mockRebarPrimitive = new Mock<IRebarNdmPrimitive>();
var mockRebarCrackInputData = new Mock<IRebarCrackInputData>();
_rebarStressResultLogic.RebarPrimitive = mockRebarPrimitive.Object;

View File

@@ -25,7 +25,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
var solver = new TupleRebarsCrackSolver(mockCalculatorFactory.Object)
{
Rebars = new List<RebarPrimitive>(),
Rebars = new List<RebarNdmPrimitive>(),
InputData = new TupleCrackInputData(),
LongLength = 10.0,
ShortLength = 5.0,
@@ -60,7 +60,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Cracks
var solver = new TupleRebarsCrackSolver(mockCalculatorFactory.Object)
{
Rebars = new List<RebarPrimitive>(),
Rebars = new List<RebarNdmPrimitive>(),
InputData = new TupleCrackInputData(),
LongLength = 10.0,
ShortLength = 5.0,