View of tuple crack result was changed
This commit is contained in:
@@ -8,7 +8,7 @@ using StructureHelperLogics.NdmCalculations.Cracking;
|
||||
|
||||
namespace StructureHelperTests.UnitTests.Ndms.Cracks
|
||||
{
|
||||
public class CrackWidthLogicTest
|
||||
public class CrackWidthLogicSP63Test
|
||||
{
|
||||
[TestCase(1.4d, 0.001d, 0d, 0.3d, 0.00020999999999999998d)]
|
||||
[TestCase(1.4d, 0.001d, 0.001d, 0.3d, 0d)]
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using LoaderCalculator.Data.Ndms;
|
||||
using NUnit.Framework;
|
||||
using StructureHelperLogics.NdmCalculations.Cracking;
|
||||
|
||||
namespace StructureHelperTests.UnitTests.Ndms.Cracks
|
||||
{
|
||||
public class EquivalentDiameterLogicTest
|
||||
{
|
||||
[TestCase(0.025d, 2, 0.025d, 2, 0.025d)]
|
||||
[TestCase(0.032d, 2, 0.025d, 1, 0.029842055910607741d)]
|
||||
[TestCase(0.032d, 1, 0.025d, 2, 0.027524820186583671d)]
|
||||
public void Run_ShouldPass(double fstDiameter, int fstCount, double sndDiameter, int sndCount, double expectedDiameter)
|
||||
{
|
||||
//Arrange
|
||||
List<RebarNdm> rebar = new();
|
||||
for (int i = 0; i < fstCount; i++)
|
||||
{
|
||||
rebar.Add(new RebarNdm() { Area = 0.785d * fstDiameter * fstDiameter });
|
||||
}
|
||||
for (int i = 0; i < sndCount; i++)
|
||||
{
|
||||
rebar.Add(new RebarNdm() { Area = 0.785d * sndDiameter * sndDiameter });
|
||||
}
|
||||
var logic = new EquivalentDiameterLogic() { Rebars = rebar };
|
||||
//Act
|
||||
var eqDiametr = logic.GetAverageDiameter();
|
||||
//Assert
|
||||
Assert.AreEqual(expectedDiameter, eqDiametr, 0.0001d);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user