Awaitility.NET
1.0.2
dotnet add package Awaitility.NET --version 1.0.2
NuGet\Install-Package Awaitility.NET -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Awaitility.NET" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Awaitility.NET" Version="1.0.2" />
<PackageReference Include="Awaitility.NET" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Awaitility.NET --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Awaitility.NET, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Awaitility.NET@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Awaitility.NET&version=1.0.2
#tool nuget:?package=Awaitility.NET&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Awaitility.NET
Port of Awaitility from Java to NET world. Reference to original: https://github.com/awaitility/awaitility
Currently there are 2 implementations of wait logic:
- We wait the func in the task that runs on the new thread. In this case if timeout is reached, Awaitility will interrupt the execution and TimeoutException will be thrown. It's by default behaviour.
- We wait the func on the same thread. In this case we cannot interrupt the execution, so be carefull with that. To use it just call PollInSameThread() method.
- Async implementation will be added in 2024. Happy New Year!
Examples of code usage:
Currently examples of code usage can be found in Awaitility.Tests. It is recommended to use static import: using static Awaitility.Awaitility;
//Examples will be added later...
Await()
.AtMost(OneHundredMilliseconds)
.PollInterval(TenSeconds)
.Until(() => OrderService.GetOrder(order.Id).Status == OrderStatus.Ready);
If you want to use 1-st wait logic implementation, but you have a getter that depends on the thread, there is
Until(driver, (dr) => dr.Displayed);
implementation where you pass your instance as an argument.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.