{"id":22474804,"url":"https://github.com/jmojiwat/fluentassertions.languageext","last_synced_at":"2025-08-02T11:32:19.439Z","repository":{"id":142517521,"uuid":"432445541","full_name":"jmojiwat/FluentAssertions.LanguageExt","owner":"jmojiwat","description":"LanguageExt extensions for FluentAssertions","archived":false,"fork":false,"pushed_at":"2023-11-05T14:09:59.000Z","size":68,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T11:15:09.932Z","etag":null,"topics":["fluentassertions","languageext"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmojiwat.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":"2021-11-27T11:44:20.000Z","updated_at":"2025-04-25T13:56:54.000Z","dependencies_parsed_at":"2024-12-06T13:11:56.857Z","dependency_job_id":"2d1cb48b-e4d8-4bfc-994a-3e87f1671703","html_url":"https://github.com/jmojiwat/FluentAssertions.LanguageExt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jmojiwat/FluentAssertions.LanguageExt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmojiwat%2FFluentAssertions.LanguageExt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmojiwat%2FFluentAssertions.LanguageExt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmojiwat%2FFluentAssertions.LanguageExt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmojiwat%2FFluentAssertions.LanguageExt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmojiwat","download_url":"https://codeload.github.com/jmojiwat/FluentAssertions.LanguageExt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmojiwat%2FFluentAssertions.LanguageExt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378965,"owners_count":24240907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fluentassertions","languageext"],"created_at":"2024-12-06T13:11:54.107Z","updated_at":"2025-08-02T11:32:19.422Z","avatar_url":"https://github.com/jmojiwat.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FluentAssertions.LanguageExt\r\n\r\n* See [LanguageExt](https://github.com/louthy/language-ext/) C# Functional Programming Language Extensions for more information about functional-programming 'base class library'.\r\n* See [FluentAssertions](https://fluentassertions.com/) for more information about the extensive set of extension methods for unit tests.\r\n\r\nSpecial thanks to [@sparerd](https://github.com/sparerd) for the many new features.\r\n\r\n## Nuget\r\n\r\n```Install-Package FluentAssertions.LanguageExt```\r\n\r\n[FluentAssertions.LanguageExt](https://www.nuget.org/packages/FluentAssertions.LanguageExt/)\r\n\r\n### Option, OptionAsync and OptionUnsafe\r\n\r\n#### Methods\r\n\r\n- `BeSome()`\r\n- `BeSome(expected)`\r\n- `BeSome(action)`\r\n- `BeNone()`\r\n\r\n#### Example Usage\r\n```c#\r\nusing FluentAssertions;\r\nusing FluentAssertions.LanguageExt;\r\n\r\n... \r\nvar option = Prelude.Some(123);\r\nvar optionnone = Option\u003cint\u003e.None;\r\n\r\noption.Should().BeSome();\r\noption.Should().BeSome(8);\r\noption.Should().BeSome(s =\u003e s.Should().Be(8));\r\noption.Should().BeSome().Which.Should().Be(8);\r\n\r\noptionnone.Should().BeNone();\r\n```\r\n\r\n### Either, EitherAsync and EitherUnsafe\r\n\r\n#### Methods\r\n\r\n- `Be(expected)`\r\n- `BeLeft()`\r\n- `BeLeft(action)`\r\n- `BeRight()`\r\n- `BeRight(action)`\r\n- `BeBottom()`\r\n\r\n#### Example Usage\r\n```c#\r\nusing FluentAssertions;\r\nusing FluentAssertions.LanguageExt;\r\n\r\n... \r\nEither\u003cint, string\u003e left = Prelude.Left(8);\r\nEither\u003cint, string\u003e right = Prelude.Right(\"a\");\r\n\r\nleft.Should().BeLeft();\r\nleft.Should().BeLeft(l =\u003e l.Should().Be(8));\r\nleft.Should().BeLeft().Which.Should().Be(8);\r\nleft.Should().Be(8);\r\n\r\nright.Should().BeRight();\r\nright.Should().BeRight(r =\u003e r.Should().Be(\"a\"));\r\nright.Should().BeRight().Which.Should().Be(\"a\");\r\nright.Should().Be(\"a\");\r\n```\r\n\r\n### Validation\r\n\r\n#### Breaking Change for 0.3.1\r\n\r\nThere's a breaking change when using `BeFail()` with the .Which extension.\r\n\r\nWhen using the `BeFail()` assertion on a `Validation\u003cTFail, TSucc\u003e`, the `.Which` extension returns only a single failure instance even though the `Validation` type has a `Seq\u003cTFail\u003e`. This prevents proper assertions on the failures returned from a `Validation` using the `.Which` extension.\r\n\r\nThis has now been fixed.\r\n\r\nThe return signature for `BeFail()` has changed from `AndWhichConstraint\u003cLanguageExtValidationAssertions\u003cTFail, TSuccess\u003e, TFail\u003e` to `AndWhichConstraint\u003cLanguageExtValidationAssertions\u003cTFail, TSuccess\u003e, Seq\u003cTFail\u003e\u003e`\r\n\r\n#### Methods\r\n\r\n- `BeFail()`\r\n- `BeSuccess()`\r\n- `BeSuccess(action)`\r\n- `Be(expected)`\r\n\r\n### Try and TryAsync\r\n\r\n#### Methods\r\n\r\n- `BeFail()`\r\n- `BeSuccess()`\r\n\r\n### TryOption and TryAsyncOption\r\n\r\n#### Methods\r\n\r\n- `BeFail()`\r\n- `BeSome()`\r\n- `BeSome(action)`\r\n- `BeNone()`\r\n- `BeNoneOrFail()`\r\n- `Be(expected)`\r\n\r\n### Fin\r\n\r\n#### Methods\r\n- `BeSuccess()`\r\n- `BeSuccess(action)`\r\n- `BeFail()`\r\n- `BeBottom()`\r\n- `Be(expected)`\r\n\r\n#### Example Usage\r\n```c#\r\nusing FluentAssertions;\r\nusing FluentAssertions.LanguageExt;\r\n\r\n... \r\nFin\u003cint\u003e successFin = Prelude.FinSucc(8);\r\nFin\u003cint\u003e failedFin = Prelude.FinFail\u003cint\u003e(\"Error message\");\r\n\r\nsuccessFin.Should().BeSuccess();\r\nsuccessFin.Should().BeSuccess(v =\u003e v.Should().Be(8));\r\nsuccessFin.Should().BeSuccess().Which.Should().Be(8);\r\nsuccessFin.Should().Be(8);\r\n\r\nfailedFin.Should().BeFail();\r\nfailedFin.Should().BeFail().Which.Message.Should().Be(\"Error message\");\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmojiwat%2Ffluentassertions.languageext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmojiwat%2Ffluentassertions.languageext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmojiwat%2Ffluentassertions.languageext/lists"}