Skip to content

Commit 4208590

Browse files
committed
[dotnet] fix assertions in test
1 parent 16d44f6 commit 4208590

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dotnet/test/common/PositionAndSizeTest.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ public void ShouldHandleNonIntegerPositionAndSize()
137137

138138
IWebElement r2 = driver.FindElement(By.Id("r2"));
139139
string left = r2.GetCssValue("left");
140-
Assert.AreEqual(Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1), 10.9);
140+
Assert.AreEqual(10.9, Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1));
141141
string top = r2.GetCssValue("top");
142-
Assert.AreEqual(Math.Round(Convert.ToDecimal(top.Replace("px", "")), 1), 10.1);
142+
Assert.AreEqual(10.1, Math.Round(Convert.ToDecimal(top.Replace("px", "")), 1));
143143
Assert.AreEqual(new Point(11, 10), r2.Location);
144144
string width = r2.GetCssValue("width");
145-
Assert.AreEqual(Math.Round(Convert.ToDecimal(width.Replace("px", "")), 1), 48.6);
145+
Assert.AreEqual(48.7, Math.Round(Convert.ToDecimal(width.Replace("px", "")), 1));
146146
string height = r2.GetCssValue("height");
147-
Assert.AreEqual(Math.Round(Convert.ToDecimal(height.Replace("px", "")), 1), 49.3);
148-
Assert.AreEqual(r2.Size, new Size(49, 49));
147+
Assert.AreEqual(49.3, Math.Round(Convert.ToDecimal(height.Replace("px", "")), 1));
148+
Assert.AreEqual(new Size(49, 49), r2.Size);
149149
}
150150

151151
//------------------------------------------------------------------

0 commit comments

Comments
 (0)