Add calculators saving
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user