{"id":18937511,"url":"https://github.com/verifytests/verify.brighter","last_synced_at":"2025-09-05T08:31:59.528Z","repository":{"id":152227475,"uuid":"625410159","full_name":"VerifyTests/Verify.Brighter","owner":"VerifyTests","description":"Adds Verify support for verifying Brighter.","archived":false,"fork":false,"pushed_at":"2024-04-30T03:46:09.000Z","size":216,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T09:37:51.362Z","etag":null,"topics":[],"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/VerifyTests.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","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},"funding":{"github":"VerifyTests"}},"created_at":"2023-04-09T02:47:59.000Z","updated_at":"2024-05-10T03:40:12.499Z","dependencies_parsed_at":null,"dependency_job_id":"ef3dc43f-ce12-4b11-ad0e-2ea2e3d635fa","html_url":"https://github.com/VerifyTests/Verify.Brighter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Brighter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Brighter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Brighter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VerifyTests%2FVerify.Brighter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VerifyTests","download_url":"https://codeload.github.com/VerifyTests/Verify.Brighter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232032041,"owners_count":18462966,"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","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":[],"created_at":"2024-11-08T12:11:31.503Z","updated_at":"2024-12-31T21:41:52.711Z","avatar_url":"https://github.com/VerifyTests.png","language":"C#","funding_links":["https://github.com/sponsors/VerifyTests"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"/src/icon.png\" height=\"30px\"\u003e Verify.Brighter\n\n[![Discussions](https://img.shields.io/badge/Verify-Discussions-yellow?svg=true\u0026label=)](https://github.com/orgs/VerifyTests/discussions)\n[![Build status](https://ci.appveyor.com/api/projects/status/qwqcg22d7v2awni7?svg=true)](https://ci.appveyor.com/project/SimonCropp/Verify-Brighter)\n[![NuGet Status](https://img.shields.io/nuget/v/Verify.Brighter.svg)](https://www.nuget.org/packages/Verify.Brighter/)\n\nAdds [Verify](https://github.com/VerifyTests/Verify) support for verifying [Brighter](https://www.goparamore.io/).\n\n**See [Milestones](../../milestones?state=closed) for release notes.**\n\n## NuGet package\n\nhttps://nuget.org/packages/Verify.Brighter/\n\n\n## Usage\n\n\u003c!-- snippet: Enable --\u003e\n\u003ca id='snippet-Enable'\u003e\u003c/a\u003e\n```cs\n[ModuleInitializer]\npublic static void Init() =\u003e\n    VerifyBrighter.Initialize();\n```\n\u003csup\u003e\u003ca href='/src/Tests/ModuleInitializer.cs#L3-L9' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Enable' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Handler\n\nGiven the handler:\n\n\u003c!-- snippet: Handler --\u003e\n\u003ca id='snippet-Handler'\u003e\u003c/a\u003e\n```cs\npublic class Handler(IAmACommandProcessor processor) :\n    RequestHandlerAsync\u003cMessage\u003e\n{\n    public override async Task\u003cMessage\u003e HandleAsync(\n        Message message,\n        Cancel cancel = default)\n    {\n        await processor.SendAsync(new MyCommand(\"Some data\"));\n        await processor.PublishAsync(new MyEvent(\"Some other data\"));\n\n        return await base.HandleAsync(message);\n    }\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L30-L46' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Handler' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Test\n\nPass in instance of `RecordingMessageContext` in to the `Handle` method and then `Verify` that instance.\n\n\u003c!-- snippet: HandlerTest --\u003e\n\u003ca id='snippet-HandlerTest'\u003e\u003c/a\u003e\n```cs\n[Fact]\npublic async Task HandlerTest()\n{\n    var context = new RecordingCommandProcessor();\n    var handler = new Handler(context);\n    await handler.HandleAsync(new Message(\"value\"));\n    await Verify(context);\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.cs#L7-L18' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-HandlerTest' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\nWill result in:\n\n\u003c!-- snippet: Tests.HandlerTest.verified.txt --\u003e\n\u003ca id='snippet-Tests.HandlerTest.verified.txt'\u003e\u003c/a\u003e\n```txt\n{\n  Send: MyCommand: {\n    Property: Some data\n  },\n  Publish: MyEvent: {\n    Property: Some other data\n  }\n}\n```\n\u003csup\u003e\u003ca href='/src/Tests/Tests.HandlerTest.verified.txt#L1-L8' title='Snippet source file'\u003esnippet source\u003c/a\u003e | \u003ca href='#snippet-Tests.HandlerTest.verified.txt' title='Start of snippet'\u003eanchor\u003c/a\u003e\u003c/sup\u003e\n\u003c!-- endSnippet --\u003e\n\n\n## Icon\n\n[Cannon](https://thenounproject.com/term/cannon/2181690/) from [The Noun Project](https://thenounproject.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.brighter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverifytests%2Fverify.brighter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverifytests%2Fverify.brighter/lists"}