Skip to content

Commit 3f156fa

Browse files
committed
Adjust tests
1 parent 1b5ec71 commit 3f156fa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dotnet/test/common/CookieImplementationTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,7 @@ public void SettingACookieThatExpiredInThePast()
553553
IOptions options = driver.Manage();
554554
options.Cookies.AddCookie(cookie);
555555

556-
cookie = options.Cookies.GetCookieNamed("expired");
557-
Assert.That(cookie, Is.Null, "Cookie expired before it was set, so nothing should be returned: " + cookie);
556+
Assert.That(() => options.Cookies.GetCookieNamed("expired"), Throws.InstanceOf<NoSuchCookieException>());
558557
}
559558

560559
[Test]
@@ -579,9 +578,8 @@ public void CanSetCookieWithoutOptionalFieldsSet()
579578
public void DeleteNotExistedCookie()
580579
{
581580
String key = GenerateUniqueKey();
582-
AssertCookieIsNotPresentWithName(key);
583581

584-
driver.Manage().Cookies.DeleteCookieNamed(key);
582+
Assert.That(() => driver.Manage().Cookies.DeleteCookieNamed(key), Throws.Nothing);
585583
}
586584

587585
[Test]

0 commit comments

Comments
 (0)