Show / Hide Table of Contents

Class Assertions

Miscellaneous Xunit helpers.

Inheritance
System.Object
Assertions
Namespace: LaunchDarkly.TestHelpers
Assembly: LaunchDarkly.TestHelpers.dll
Syntax
public static class Assertions : Object

Methods

AssertEventually(TimeSpan, TimeSpan, Func<Boolean>)

Polls a function repeatedly until it returns true, failing if it times out.

Declaration
public static void AssertEventually(TimeSpan timeout, TimeSpan interval, Func<bool> test)
Parameters
Type Name Description
System.TimeSpan timeout

the maximum time to wait

System.TimeSpan interval

the interval to poll at

System.Func<System.Boolean> test

the function to test

AssertEventuallyAsync(TimeSpan, TimeSpan, Func<Task<Boolean>>)

Polls a function repeatedly until it returns true, failing if it times out.

Declaration
public static Task AssertEventuallyAsync(TimeSpan timeout, TimeSpan interval, Func<Task<bool>> test)
Parameters
Type Name Description
System.TimeSpan timeout

the maximum time to wait

System.TimeSpan interval

the interval to poll at

System.Func<System.Threading.Tasks.Task<System.Boolean>> test

the function to test

Returns
Type Description
System.Threading.Tasks.Task
In This Article
Back to top Generated by DocFX