Skip to content

Commit 69f891e

Browse files
committed
fix to tests
1 parent 4f9f0e6 commit 69f891e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/MandMCounter.Tests/Controllers/MandMControllerTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ public void ControllerCountMandMsInA1CubicCMTest()
3737
float height = 10;
3838
float width = 10;
3939
float length = 10;
40+
const float expectedMandMs = 1070f;
4041

4142
//Act
4243
float result = _controller.GetDataForRectangle(unit, height, width, length);
4344

4445
//Assert
45-
Assert.IsLessThan(1069f, result);
46+
Assert.IsLessThan(expectedMandMs, result);
4647
}
4748

4849
[TestMethod]
@@ -52,12 +53,13 @@ public void ControllerCountMandMsInACylinderWithCMTest()
5253
string unit = "cm";
5354
float height = 10;
5455
float radius = 5;
56+
const float expectedMandMs = 840f;
5557

5658
//Act
5759
float result = _controller.GetDataForCylinder(unit, height, radius);
5860

5961
//Assert
60-
Assert.IsLessThan(840f, result);
62+
Assert.IsLessThan(expectedMandMs, result);
6163
}
6264

6365
}

src/MandMCounter.Tests/Controllers/SkittleControllerTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void ControllerCountSkittlesInAUSCupTest()
2121
//Arrange
2222
string unit = "Cup";
2323
float quantity = 1f;
24-
const float expectedSkittles = 212f;
24+
const float expectedSkittles = 213f;
2525

2626
//Act
2727
//SkittleCounterController controller = new SkittleCounterController();
@@ -39,7 +39,7 @@ public void ControllerCountSkittlesInA1CubicCMTest()
3939
float height = 10;
4040
float width = 10;
4141
float length = 10;
42-
const float expectedSkittles = 896f;
42+
const float expectedSkittles = 897f;
4343

4444
//Act
4545
//SkittleCounterController controller = new SkittleCounterController();
@@ -56,7 +56,7 @@ public void ControllerCountSkittlesInACylinderWithCMTest()
5656
string unit = "cm";
5757
float height = 10;
5858
float radius = 5;
59-
const float expectedSkittles = 704f;
59+
const float expectedSkittles = 705f;
6060

6161
//Act
6262
//SkittleCounterController controller = new SkittleCounterController();

0 commit comments

Comments
 (0)