{"id":31919885,"url":"https://github.com/heleonix/heleonix.testing","last_synced_at":"2025-10-13T21:48:25.774Z","repository":{"id":86431076,"uuid":"117291308","full_name":"Heleonix/Heleonix.Testing","owner":"Heleonix","description":"The library for writing tests in BDD and AAA styles","archived":false,"fork":false,"pushed_at":"2024-03-27T21:07:51.000Z","size":374,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-27T23:35:06.293Z","etag":null,"topics":["aaa","arrange-act-assert","bdd","behavior-driven-development","heleonix","nunit","tdd","test","test-driven-development"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Heleonix.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}},"created_at":"2018-01-12T21:51:28.000Z","updated_at":"2024-03-27T23:35:06.294Z","dependencies_parsed_at":null,"dependency_job_id":"7cef1db7-0302-44d1-9c17-b57c07199e66","html_url":"https://github.com/Heleonix/Heleonix.Testing","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Heleonix/Heleonix.Testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heleonix%2FHeleonix.Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heleonix%2FHeleonix.Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heleonix%2FHeleonix.Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heleonix%2FHeleonix.Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Heleonix","download_url":"https://codeload.github.com/Heleonix/Heleonix.Testing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Heleonix%2FHeleonix.Testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017020,"owners_count":26085951,"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-10-13T02:00:06.723Z","response_time":61,"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":["aaa","arrange-act-assert","bdd","behavior-driven-development","heleonix","nunit","tdd","test","test-driven-development"],"created_at":"2025-10-13T21:47:29.365Z","updated_at":"2025-10-13T21:48:25.769Z","avatar_url":"https://github.com/Heleonix.png","language":"C#","readme":"# Heleonix.Testing\n\n[![Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Testing/actions/workflows/release-net-nuget.yml/badge.svg)](https://github.com/Heleonix/Heleonix.Testing/actions/workflows/release-net-nuget.yml)\n\nThe library for writing tests in BDD and AAA styles\n\n## Install\nhttps://www.nuget.org/packages/Heleonix.Testing.NUnit\n\n## AAA: Arrange Act Assert\n\n### Structure\n```csharp\nusing global::NUnit.Framework;\nusing Heleonix.Testing.NUnit.Aaa;\nusing static Heleonix.Testing.NUnit.Aaa.AaaSpec;\n\n/// \u003csummary\u003e\n/// Tests the \u003csee cref=\"MyComponent\"/\u003e.\n/// \u003c/summary\u003e\n[ComponentTest(Type = typeof(MyComponent))]\npublic static class MyComponentTests\n{\n    /// \u003csummary\u003e\n    /// Tests the \u003csee cref=\"MyComponent.Member1\"/\u003e.\n    /// \u003c/summary\u003e\n    [MemberTest(Name = nameof(MyComponent.Member1))]\n    public static void Member1()\n    {\n        Arrange(() =\u003e\n        {\n        });\n\n        Act(() =\u003e\n        {\n        });\n\n        Teardown(() =\u003e\n        {\n        });\n\n        When(\"the condition #1 is true\", () =\u003e\n        {\n            Arrange(() =\u003e\n            {\n            });\n\n            Act(() =\u003e\n            {\n            });\n\n            Teardown(() =\u003e\n            {\n            });\n\n            Should(\"lead to the result #1\", () =\u003e\n            {\n            });\n        });\n\n        When(\"the condition #2 is true\", () =\u003e\n        {\n            Arrange(() =\u003e\n            {\n            });\n\n            Act(() =\u003e\n            {\n            });\n\n            Teardown(() =\u003e\n            {\n            });\n\n            Should(\"lead to the result #2\", () =\u003e\n            {\n            });\n        });\n    }\n\n    /// \u003csummary\u003e\n    /// Tests the \u003csee cref=\"MyComponent.Member2\"/\u003e.\n    /// \u003c/summary\u003e\n    [MemberTest(Name = nameof(MyComponent.Member2))]\n    public static void Member2()\n    {\n        Arrange(() =\u003e\n        {\n        });\n\n        Act(() =\u003e\n        {\n        });\n\n        Teardown(() =\u003e\n        {\n        });\n\n        When(\"the action #1 is executed\", () =\u003e\n        {\n            Arrange(() =\u003e\n            {\n            });\n\n            Act(() =\u003e\n            {\n            });\n\n            Teardown(() =\u003e\n            {\n            });\n\n            Should(\"lead to the result #1\", () =\u003e\n            {\n                Assert.Fail();\n            });\n\n            And(\"the condition #1 is true\", () =\u003e\n            {\n                Arrange(() =\u003e\n                {\n                });\n\n                Act(() =\u003e\n                {\n                });\n\n                Teardown(() =\u003e\n                {\n                });\n\n                Should(\"lead to the result #2\", () =\u003e\n                {\n                });\n            });\n        });\n    }\n}\n```\n\n### Tests Output\n\n![AAA](https://raw.githubusercontent.com/Heleonix/docs/master/Heleonix.Testing/images/AAA.png)\n\n## BDD: Behavior Driven Development\n\n### Structure\n```csharp\nusing global::NUnit.Framework;\nusing Heleonix.Testing.NUnit.Bdd;\nusing static Heleonix.Testing.NUnit.Bdd.BddSpec;\n\n/// \u003csummary\u003e\n/// Tests the TheCoolStory.\n/// \u003c/summary\u003e\n[Feature(Name = \"The Cool Feature\")]\nOR\n[Story(\n    Id = \"111\",\n    Summary = \"The cool story\",\n    AsA = \"Product owner\",\n    IWant = \"a cool story\",\n    SoThat = \"I earn a lot of money\")]\npublic static class TheCoolStory\n{\n    /// \u003csummary\u003e\n    /// Tests the Scenario.\n    /// \u003c/summary\u003e\n    [Scenario(Name = \"Earn a lot of money in the story\")]\n    public static void Scenario()\n    {\n        Given(\"the precondition #1\", () =\u003e\n        {\n            BeforeEach(() =\u003e { });\n\n            AfterEach(() =\u003e { });\n\n            When(\"the action #1 is executed\", () =\u003e\n            {\n                BeforeEach(() =\u003e { });\n\n                AfterEach(() =\u003e { });\n\n                Then(\"the result #1 happens\", () =\u003e { });\n\n                And(\"the condition #1 is true\", () =\u003e\n                {\n                    BeforeEach(() =\u003e { });\n\n                    AfterEach(() =\u003e { });\n\n                    Then(\"the result #2 happens\", () =\u003e { Assert.Fail(); });\n                });\n            });\n\n            And(\"condition #2 is true\", () =\u003e\n            {\n                BeforeEach(() =\u003e { });\n\n                AfterEach(() =\u003e { });\n\n                When(\"the action #2 is executed\", () =\u003e\n                {\n                    BeforeEach(() =\u003e { });\n\n                    AfterEach(() =\u003e { });\n\n                    Then(\"the result #3 happens\", () =\u003e { });\n\n                    And(\"the condition #3 is true\", () =\u003e\n                    {\n                        BeforeEach(() =\u003e { });\n\n                        AfterEach(() =\u003e { });\n\n                        Then(\"the result #4 happens\", () =\u003e { });\n                    });\n                });\n            });\n        });\n    }\n}\n```\n\n### Tests Output\n\n![BDD](https://raw.githubusercontent.com/Heleonix/docs/master/Heleonix.Testing/images/BDD.png)\n\n## Contribution Guideline\n\n1. [Create a fork](https://github.com/Heleonix/Heleonix.Testing/fork) from the main repository\n2. Implement whatever is needed\n3. [Create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).\n   Make sure the assigned [Checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks#checks) pass successfully.\n   You can watch the progress in the [PR: .NET](https://github.com/Heleonix/Heleonix.Testing/actions/workflows/pr-net.yml) GitHub workflows\n4. [Request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) from the code owner\n5. Once approved, merge your Pull Request via [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)\n\n   \u003e **IMPORTANT**  \n   \u003e While merging, enter a [Conventional Commits](https://www.conventionalcommits.org/) commit message.\n   \u003e This commit message will be used in automatically generated [Github Release Notes](https://github.com/Heleonix/Heleonix.Testing/releases)\n   \u003e and [NuGet Release Notes](https://www.nuget.org/packages/Heleonix.Testing/#releasenotes-body-tab)\n\n6. Monitor the [Release: .NET / NuGet](https://github.com/Heleonix/Heleonix.Testing/actions/workflows/release-net-nuget.yml)\n   GitHub workflow to make sure your changes are delivered successfully\n7. In case of any issues, please contact [heleonix.sln@gmail.com](mailto:heleonix.sln@gmail.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheleonix%2Fheleonix.testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheleonix%2Fheleonix.testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheleonix%2Fheleonix.testing/lists"}