Skip to content

Commit

Permalink
[dotnet] fix assertions in test
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Sep 17, 2023
1 parent 16d44f6 commit 4208590
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dotnet/test/common/PositionAndSizeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ public void ShouldHandleNonIntegerPositionAndSize()

IWebElement r2 = driver.FindElement(By.Id("r2"));
string left = r2.GetCssValue("left");
Assert.AreEqual(Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1), 10.9);
Assert.AreEqual(10.9, Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1));
string top = r2.GetCssValue("top");
Assert.AreEqual(Math.Round(Convert.ToDecimal(top.Replace("px", "")), 1), 10.1);
Assert.AreEqual(10.1, Math.Round(Convert.ToDecimal(top.Replace("px", "")), 1));
Assert.AreEqual(new Point(11, 10), r2.Location);
string width = r2.GetCssValue("width");
Assert.AreEqual(Math.Round(Convert.ToDecimal(width.Replace("px", "")), 1), 48.6);
Assert.AreEqual(48.7, Math.Round(Convert.ToDecimal(width.Replace("px", "")), 1));
string height = r2.GetCssValue("height");
Assert.AreEqual(Math.Round(Convert.ToDecimal(height.Replace("px", "")), 1), 49.3);
Assert.AreEqual(r2.Size, new Size(49, 49));
Assert.AreEqual(49.3, Math.Round(Convert.ToDecimal(height.Replace("px", "")), 1));
Assert.AreEqual(new Size(49, 49), r2.Size);
}

//------------------------------------------------------------------
Expand Down

0 comments on commit 4208590

Please sign in to comment.