Skip to content

Commit 52aeada

Browse files
authored
Merge branch 'main' into finding-autofix-733fec3b
2 parents 6a0c2e1 + d0b871d commit 52aeada

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MandMCounter.Tests/Controllers/MandMControllerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void ControllerCountMandMsInAUSGallonTest()
2222
float result = controller.GetDataForUnit(unit, quantity);
2323

2424
//Assert
25-
Assert.IsTrue(System.Math.Round(result, 0) == 253f);
25+
Assert.IsTrue(Math.Abs(System.Math.Round(result, 0) - 253f) < 0.5);
2626
}
2727

2828
#endregion
@@ -43,7 +43,7 @@ public void ControllerCountMandMsInA1CubicCMTest()
4343
float result = controller.GetDataForRectangle(unit, height, width, length);
4444

4545
//Assert
46-
Assert.IsTrue(System.Math.Round(result, 0) == 1069f);
46+
Assert.IsTrue(Math.Abs(System.Math.Round(result, 0) - 1069f) < 0.5);
4747
}
4848

4949
#endregion
@@ -63,7 +63,7 @@ public void ControllerCountMandMsInACylinderWithCMTest()
6363
float result = controller.GetDataForCylinder(unit, height, radius);
6464

6565
//Assert
66-
Assert.IsTrue(System.Math.Round(result, 0) == 840f);
66+
Assert.IsTrue(Math.Abs(System.Math.Round(result, 0) - 840f) < 0.5);
6767
}
6868

6969
#endregion

0 commit comments

Comments
 (0)