Skip to content

Commit

Permalink
Changing method name in .NET test
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Aug 8, 2019
1 parent abfb96f commit f74b4dc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions dotnet/test/common/Interactions/DragAndDropTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public void DragAndDropRelative()
{
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test1"));
Point expectedLocation = drag(img, img.Location, 150, 200);
Point expectedLocation = Drag(img, img.Location, 150, 200);
Assert.AreEqual(expectedLocation, img.Location);
expectedLocation = drag(img, img.Location, -50, -25);
expectedLocation = Drag(img, img.Location, -50, -25);
Assert.AreEqual(expectedLocation, img.Location);
expectedLocation = drag(img, img.Location, 0, 0);
expectedLocation = Drag(img, img.Location, 0, 0);
Assert.AreEqual(expectedLocation, img.Location);
expectedLocation = drag(img, img.Location, 1, -1);
expectedLocation = Drag(img, img.Location, 1, -1);
Assert.AreEqual(expectedLocation, img.Location);
}

Expand Down Expand Up @@ -117,7 +117,7 @@ public void ElementInDiv()
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test3"));
Point startLocation = img.Location;
Point expectedLocation = drag(img, startLocation, 100, 100);
Point expectedLocation = Drag(img, startLocation, 100, 100);
Point endLocation = img.Location;
Assert.AreEqual(expectedLocation, endLocation);
}
Expand Down Expand Up @@ -153,7 +153,7 @@ public void ShouldAllowUsersToDragAndDropToElementsOffTheCurrentViewPort()
{
driver.Url = dragAndDropPage;
IWebElement img = driver.FindElement(By.Id("test3"));
Point expectedLocation = drag(img, img.Location, 100, 100);
Point expectedLocation = Drag(img, img.Location, 100, 100);
Assert.AreEqual(expectedLocation, img.Location);
}
finally
Expand Down Expand Up @@ -230,11 +230,13 @@ public void DragAndDropRelativeAndToElement()
IWebElement img1 = driver.FindElement(By.Id("test1"));
IWebElement img2 = driver.FindElement(By.Id("test2"));
Actions actionProvider = new Actions(driver);
actionProvider.DragAndDropToOffset(img1, 100, 100).DragAndDrop(img2, img1).Perform();
actionProvider.DragAndDropToOffset(img1, 100, 100).Perform();
actionProvider.Reset();
actionProvider.DragAndDrop(img2, img1).Perform();
Assert.AreEqual(img1.Location, img2.Location);
}

private Point drag(IWebElement elem, Point initialLocation, int moveRightBy, int moveDownBy)
private Point Drag(IWebElement elem, Point initialLocation, int moveRightBy, int moveDownBy)
{
Point expectedLocation = new Point(initialLocation.X, initialLocation.Y);
expectedLocation.Offset(moveRightBy, moveDownBy);
Expand Down

0 comments on commit f74b4dc

Please sign in to comment.