Skip to content

Commit

Permalink
Cover final line
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Jul 21, 2023
1 parent c1770dc commit fa07be0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tests/Realm.Tests/Database/APITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,22 @@ public void TestTaskTimeout()
var ex3 = await TestHelpers.AssertThrows<TimeoutException>(() => GetIntTask().Timeout(10, detail: "another detail"));
Assert.That(ex3.Message, Does.Contain("another detail"));
var ex4 = await TestHelpers.AssertThrows<ArgumentException>(() => GetFaultedIntTask().Timeout(1000));
Assert.That(ex4.Message, Does.Contain("super invalid"));
static async Task<int> GetIntTask()
{
await Task.Delay(100);
return 5;
}
static Task GetVoidTask() => Task.Delay(100);
static async Task<int> GetFaultedIntTask()
{
await Task.Delay(1);
throw new ArgumentException("super invalid");
}
});
}

Expand Down

0 comments on commit fa07be0

Please sign in to comment.