{"id":37116783,"url":"https://github.com/mazharenko/fluentassertions.eventual","last_synced_at":"2026-01-14T13:41:02.222Z","repository":{"id":54637276,"uuid":"509709059","full_name":"mazharenko/FluentAssertions.Eventual","owner":"mazharenko","description":"The extension allows to wait for an assertion to pass","archived":true,"fork":false,"pushed_at":"2025-05-05T06:52:47.000Z","size":92,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T07:41:20.126Z","etag":null,"topics":["csharp-sourcegenerator","extensions","fluentassertions"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mazharenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-02T09:09:03.000Z","updated_at":"2025-05-05T06:53:11.000Z","dependencies_parsed_at":"2023-08-08T23:16:12.067Z","dependency_job_id":"ae917c46-5fbb-4655-a847-f619bf50319d","html_url":"https://github.com/mazharenko/FluentAssertions.Eventual","commit_stats":null,"previous_names":["mazharenko/fluentassertions.eventual"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mazharenko/FluentAssertions.Eventual","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazharenko%2FFluentAssertions.Eventual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazharenko%2FFluentAssertions.Eventual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazharenko%2FFluentAssertions.Eventual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazharenko%2FFluentAssertions.Eventual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazharenko","download_url":"https://codeload.github.com/mazharenko/FluentAssertions.Eventual/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazharenko%2FFluentAssertions.Eventual/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp-sourcegenerator","extensions","fluentassertions"],"created_at":"2026-01-14T13:41:01.441Z","updated_at":"2026-01-14T13:41:02.217Z","avatar_url":"https://github.com/mazharenko.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"The project is archived due to the recent FluentAssertions licence [update](https://github.com/fluentassertions/fluentassertions/pull/2943).\r\n\r\n[![Nuget package](https://img.shields.io/nuget/v/mazharenko.FluentAssertions.Eventual.svg?label=csharp\u0026logo=nuget)](https://www.nuget.org/packages/mazharenko.FluentAssertions.Eventual/)\r\n[![Nuget package](https://img.shields.io/nuget/v/mazharenko.FluentAssertions.Eventual.FSharp.svg?label=fsharp\u0026logo=nuget)](https://www.nuget.org/packages/mazharenko.FluentAssertions.Eventual.FSharp/)\r\n[![Nuget package](https://img.shields.io/nuget/v/mazharenko.FluentAssertions.Eventual.Generator.svg?label=source%20generator\u0026logo=nuget\u0026labelColor=red)](https://www.nuget.org/packages/mazharenko.FluentAssertions.Eventual.Generator/)\r\n\r\n[![License: CC0-1.0](https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg)](LICENSE)\r\n\r\n\r\n# Eventual assertions for FluentAssertions\r\n\r\n`FluentAssertions.Eventual` is an extension that allows to wait for `FluentAssertions` checks to pass which can be useful when writing end-to-end tests.\r\n\r\n## Basic usage\r\n\r\nAny `FluentAssertions` checks can be placed under a special `foreach` loop, which will implement the waiting and retry logic.\r\n\r\n```csharp\r\nforeach (var _ in EventualAssertions.Attempts(4.Seconds(), 400.Milliseconds()))\r\n{\r\n    button.Should().BeVisible();\r\n}\r\n```\r\n\r\n## Source generator usage\r\n\r\nWhen having a custom assertion class for a dynamic by nature subject the class can be decorated by the `[GenerateEventual]` attribute to get a special waiting wrapper generated.\r\n\r\nYour code (simplified):\r\n\r\n```csharp\r\n[GenerateEventual]\r\npublic class ButtonAssertions\r\n{\r\n    [CustomAssertion]\r\n    public AndConstraint\u003cButtonAssertions\u003e BeVisible(string? because = null, params object[] becauseArgs)\r\n    {\r\n        // implementation\r\n    }\r\n}\r\n```\r\n\r\nWhat gets generated (simplified):\r\n\r\n```csharp\r\npublic static class ButtonAssertions_Eventual_Extensions\r\n{\r\n    public static ButtonAssertions_Eventual Eventually(this ButtonAssertions underlying) { /* ... */ }\r\n    // more generated extensions\r\n}\r\n\r\npublic class ButtonAssertions_Eventual\r\n{\r\n    // constructor, fields\r\n\r\n    [CustomAssertion]\r\n    public AndConstraint\u003cButtonAssertions\u003e BeVisible(string? because = null, params object[] becauseArgs)\r\n    {\r\n        AndConstraint\u003cCurrentDateTimeAssertions\u003e result = default !;\r\n        foreach (var _  in EventualAssertions.Attempts(timeout, delay))\r\n            result = underlying.BeVisible(because, becauseArgs);\r\n        return result;\r\n    }\r\n}\r\n```\r\n\r\nWhich allows for the following syntax:\r\n\r\n```csharp\r\nbutton.Should().Eventually().BeVisible();\r\nbutton.Should().Eventually(4.Seconds(), 400.Milliseconds()).BeVisible();\r\nbutton.Should().EventuallyLong().BeVisible();\r\n```\r\n\r\n## More info\r\n\r\nComplete interactive README in mybinder:\\\r\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mazharenko/FluentAssertions.Eventual/HEAD?urlpath=lab/tree/README.ipynb)\r\n\r\nAlso in nbviewer:\\\r\n[![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/mazharenko/FluentAssertions.Eventual/tree/HEAD/docs/README.ipynb)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazharenko%2Ffluentassertions.eventual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazharenko%2Ffluentassertions.eventual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazharenko%2Ffluentassertions.eventual/lists"}