Skip to content

Commit

Permalink
fixed asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Raczek committed Nov 29, 2024
1 parent 1abf00d commit 9a00fc0
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Ocaramba.UnitTests/Tests/LocatorExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void IdLocatorTest()
.GoToDragAndDropPage()
.GetByIdLocator;

Assert.AreEqual("A", columnAText);
Assert.That(columnAText, Is.EqualTo("A"));
}

[Test]
Expand All @@ -28,15 +28,15 @@ public void ClassNameLocatorTest()
#if net8_0
if (BaseConfiguration.Env == "Linux")
{
Assert.AreEqual("Drag and Drop\nA\nB", titleByClassName);
Assert.That(titleByClassName, Is.EqualTo("Drag and Drop\nA\nB"));
}
else
{
Assert.AreEqual("Drag and Drop\r\nA\r\nB", titleByClassName);
Assert.That(titleByClassName, Is.EqualTo("Drag and Drop\r\nA\r\nB"));
}
#endif
#if net47
Assert.AreEqual("Drag and Drop\r\nA\r\nB", titleByClassName);
Assert.That(titleByClassName, Is.EqualTo("Drag and Drop\r\nA\r\nB"));
#endif
}

Expand All @@ -49,15 +49,15 @@ public void CssSelectorLocatorTest()
#if net8_0
if (BaseConfiguration.Env == "Linux")
{
Assert.AreEqual("Drag and Drop\nA\nB", titleByCssSelector);
Assert.That(titleByCssSelector, Is.EqualTo("Drag and Drop\nA\nB"));
}
else
{
Assert.AreEqual("Drag and Drop\r\nA\r\nB", titleByCssSelector);
Assert.That(titleByCssSelector, Is.EqualTo("Drag and Drop\r\nA\r\nB"));
}
#endif
#if net47
Assert.AreEqual("Drag and Drop\r\nA\r\nB", titleByCssSelector);
Assert.That(titleByCssSelector, Is.EqualTo("Drag and Drop\r\nA\r\nB"));
#endif
}

Expand All @@ -68,7 +68,7 @@ public void LinkTextLocatorTest()
.OpenHomePage()
.GoToDropdownPageByLinkText().SelectedText;

Assert.AreEqual("Please select an option", selectedOption);
Assert.That(selectedOption, Is.EqualTo("Please select an option"));
}

[Test]
Expand All @@ -81,15 +81,15 @@ public void NameLocatorTest()
#if net8_0
if (BaseConfiguration.Env == "Linux")
{
Assert.AreEqual("Username\nPassword\nLogin", columnA);
Assert.That(columnA, Is.EqualTo("Username\nPassword\nLogin"));
}
else
{
Assert.AreEqual("Username\r\nPassword\r\nLogin", columnA);
Assert.That(columnA, Is.EqualTo("Username\r\nPassword\r\nLogin"));
}
#endif
#if net47
Assert.AreEqual("Username\r\nPassword\r\nLogin", columnA);
Assert.That(columnA, Is.EqualTo("Username\r\nPassword\r\nLogin"));
#endif
}

Expand All @@ -99,7 +99,7 @@ public void PartialLinkTextLocatorTest()
{
var titleBypartialLinkText = new InternetPage(DriverContext)
.OpenHomePage().GetDragAndDropLinkByPartialLinkText;
Assert.AreEqual("Drag and Drop", titleBypartialLinkText);
Assert.That(titleBypartialLinkText, Is.EqualTo("Drag and Drop"));
}

[Test]
Expand All @@ -109,7 +109,7 @@ public void TagNameLocatorTest()
.OpenHomePage()
.GoToTablesPage().GetByTagNameLocator;

Assert.AreEqual("Last Name", titleByTagName);
Assert.That(titleByTagName, Is.EqualTo("Last Name"));
}

[Test]
Expand All @@ -119,7 +119,7 @@ public void XPathLocatorTest()
.OpenHomePage()
.GoToTablesPage().GetByXpathLocator;

Assert.AreEqual("Last Name", linkByXPath);
Assert.That(linkByXPath, Is.EqualTo("Last Name"));
}
}
}

0 comments on commit 9a00fc0

Please sign in to comment.